aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java
diff options
context:
space:
mode:
authorAndreas Straub <andy@strb.org>2015-07-08 18:16:05 +0200
committerAndreas Straub <andy@strb.org>2015-07-08 18:16:05 +0200
commit34f90f2eb7c4a641994f1cb4bbc32771364d4f79 (patch)
treeba9d670bb3a5355101e6cba5955b9f57168f5868 /src/main/java
parent2f487c794778e305ff3a1adfe010f3234f186f2a (diff)
parentef1429c9a6983c101da41a277bd9353374dc89e7 (diff)
Merge branch 'development' into CryptoNextAlpha
* development: show contacts name in non anonymous mucs. fixes #1213
Diffstat (limited to 'src/main/java')
-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 {