Use recipient's display name instead of sender's name in messaging notifications. Fixes #249.

This commit is contained in:
Ali Moghnieh 2015-10-30 19:22:39 +00:00
parent fb4af9fefc
commit dc24bb53c2

View file

@ -57,13 +57,13 @@ public class SimpleMessageRecipient implements IMessageRecipient {
MessageResponse messageResponse = recipient.onReceiveMessage(this.parent, message); MessageResponse messageResponse = recipient.onReceiveMessage(this.parent, message);
switch (messageResponse) { switch (messageResponse) {
case MESSAGES_IGNORED: case MESSAGES_IGNORED:
sendMessage(tl("msgIgnore", getDisplayName())); sendMessage(tl("msgIgnore", recipient.getDisplayName()));
break; break;
case SENDER_IGNORED: case SENDER_IGNORED:
break; break;
// When this recipient is AFK, notify the sender. Then, proceed to send the message. // When this recipient is AFK, notify the sender. Then, proceed to send the message.
case SUCCESS_BUT_AFK: // TODO double check this functionality! case SUCCESS_BUT_AFK:
sendMessage(tl("userAFK", getDisplayName())); sendMessage(tl("userAFK", recipient.getDisplayName()));
default: default:
sendMessage(tl("msgFormat", tl("me"), recipient.getDisplayName(), message)); sendMessage(tl("msgFormat", tl("me"), recipient.getDisplayName(), message));
} }