1
0
mirror of https://github.com/moparisthebest/Yaaic synced 2024-11-22 17:02:21 -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,13 +239,25 @@ public class IRCConnection extends PircBot
{
debug("Invite", target + " " + targetNick + "(" + sourceNick + ")");
Message message = new Message(sourceNick + " invited " + targetNick);
server.getConversation(target).addMessage(message);
Intent intent = new Intent(Broadcast.CONVERSATION_MESSAGE);
intent.putExtra(Broadcast.EXTRA_SERVER, server.getId());
intent.putExtra(Broadcast.EXTRA_CONVERSATION, target);
service.sendBroadcast(intent);
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);
Intent intent = new Intent(Broadcast.CONVERSATION_MESSAGE);
intent.putExtra(Broadcast.EXTRA_SERVER, server.getId());
intent.putExtra(Broadcast.EXTRA_CONVERSATION, target);
service.sendBroadcast(intent);
}
}
/**