show room nick for /me command in sent muc messages. fixes #1773
This commit is contained in:
parent
ac09011690
commit
135c8567a5
|
@ -225,9 +225,10 @@ public class UIHelper {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getMessageDisplayName(final Message message) {
|
public static String getMessageDisplayName(final Message message) {
|
||||||
|
final Conversation conversation = message.getConversation();
|
||||||
if (message.getStatus() == Message.STATUS_RECEIVED) {
|
if (message.getStatus() == Message.STATUS_RECEIVED) {
|
||||||
final Contact contact = message.getContact();
|
final Contact contact = message.getContact();
|
||||||
if (message.getConversation().getMode() == Conversation.MODE_MULTI) {
|
if (conversation.getMode() == Conversation.MODE_MULTI) {
|
||||||
if (contact != null) {
|
if (contact != null) {
|
||||||
return contact.getDisplayName();
|
return contact.getDisplayName();
|
||||||
} else {
|
} else {
|
||||||
|
@ -237,10 +238,10 @@ public class UIHelper {
|
||||||
return contact != null ? contact.getDisplayName() : "";
|
return contact != null ? contact.getDisplayName() : "";
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (message.getConversation().getMode() == Conversation.MODE_MULTI) {
|
if (conversation.getMode() == Conversation.MODE_MULTI) {
|
||||||
return getDisplayedMucCounterpart(message.getConversation().getJid());
|
return conversation.getMucOptions().getSelf().getName();
|
||||||
} else {
|
} else {
|
||||||
final Jid jid = message.getConversation().getAccount().getJid();
|
final Jid jid = conversation.getAccount().getJid();
|
||||||
return jid.hasLocalpart() ? jid.getLocalpart() : jid.toDomainJid().toString();
|
return jid.hasLocalpart() ? jid.getLocalpart() : jid.toDomainJid().toString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue