aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel@gultsch.de>2015-07-05 18:10:18 +0200
committerDaniel Gultsch <daniel@gultsch.de>2015-07-05 18:10:18 +0200
commitef1429c9a6983c101da41a277bd9353374dc89e7 (patch)
tree25d40d98145c5b64c871c07902f6b3328a8965ce /src
parentbef731a3c8ec2d4cefb70e6a7fe4232825a1d876 (diff)
show contacts name in non anonymous mucs. fixes #1213
Diffstat (limited to 'src')
-rw-r--r--src/main/java/eu/siacs/conversations/utils/UIHelper.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/main/java/eu/siacs/conversations/utils/UIHelper.java b/src/main/java/eu/siacs/conversations/utils/UIHelper.java
index 19a8653f..ddc4781c 100644
--- a/src/main/java/eu/siacs/conversations/utils/UIHelper.java
+++ b/src/main/java/eu/siacs/conversations/utils/UIHelper.java
@@ -221,10 +221,14 @@ public class UIHelper {
public static String getMessageDisplayName(final Message message) {
if (message.getStatus() == Message.STATUS_RECEIVED) {
+ final Contact contact = message.getContact();
if (message.getConversation().getMode() == Conversation.MODE_MULTI) {
- return getDisplayedMucCounterpart(message.getCounterpart());
+ if (contact != null) {
+ return contact.getDisplayName();
+ } else {
+ return getDisplayedMucCounterpart(message.getCounterpart());
+ }
} else {
- final Contact contact = message.getContact();
return contact != null ? contact.getDisplayName() : "";
}
} else {