1
0
mirror of https://github.com/moparisthebest/Yaaic synced 2024-11-23 01:12:17 -05:00

Show own invites in selected conversation

This commit is contained in:
Sebastian Kaspari 2010-03-18 19:53:20 +01:00
parent 91536b1609
commit 61d1713a56

View File

@ -239,7 +239,18 @@ public class IRCConnection extends PircBot
{ {
debug("Invite", target + " " + targetNick + "(" + sourceNick + ")"); debug("Invite", target + " " + targetNick + "(" + sourceNick + ")");
Message message = new Message(sourceNick + " invited " + targetNick); if (targetNick.equals(this.getNick())) {
// We are invited
Message message = new Message(sourceNick + " invites you into " + target);
server.getConversation(server.getSelectedConversation()).addMessage(message);
Intent intent = new Intent(Broadcast.CONVERSATION_MESSAGE);
intent.putExtra(Broadcast.EXTRA_SERVER, server.getId());
intent.putExtra(Broadcast.EXTRA_CONVERSATION, server.getSelectedConversation());
service.sendBroadcast(intent);
} else {
// Someone is invited
Message message = new Message(sourceNick + " invites " + targetNick + " into " + target);
server.getConversation(target).addMessage(message); server.getConversation(target).addMessage(message);
Intent intent = new Intent(Broadcast.CONVERSATION_MESSAGE); Intent intent = new Intent(Broadcast.CONVERSATION_MESSAGE);
@ -247,6 +258,7 @@ public class IRCConnection extends PircBot
intent.putExtra(Broadcast.EXTRA_CONVERSATION, target); intent.putExtra(Broadcast.EXTRA_CONVERSATION, target);
service.sendBroadcast(intent); service.sendBroadcast(intent);
} }
}
/** /**
* On Join * On Join