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:
parent
91536b1609
commit
61d1713a56
@ -239,13 +239,25 @@ 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())) {
|
||||||
server.getConversation(target).addMessage(message);
|
// We are invited
|
||||||
|
Message message = new Message(sourceNick + " invites you into " + target);
|
||||||
Intent intent = new Intent(Broadcast.CONVERSATION_MESSAGE);
|
server.getConversation(server.getSelectedConversation()).addMessage(message);
|
||||||
intent.putExtra(Broadcast.EXTRA_SERVER, server.getId());
|
|
||||||
intent.putExtra(Broadcast.EXTRA_CONVERSATION, target);
|
Intent intent = new Intent(Broadcast.CONVERSATION_MESSAGE);
|
||||||
service.sendBroadcast(intent);
|
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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user