diff options
Diffstat (limited to 'src/main/java/de/pixart/messenger/entities/MucOptions.java')
-rw-r--r-- | src/main/java/de/pixart/messenger/entities/MucOptions.java | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/main/java/de/pixart/messenger/entities/MucOptions.java b/src/main/java/de/pixart/messenger/entities/MucOptions.java index 84dcb263b..8291188ae 100644 --- a/src/main/java/de/pixart/messenger/entities/MucOptions.java +++ b/src/main/java/de/pixart/messenger/entities/MucOptions.java @@ -3,6 +3,7 @@ package de.pixart.messenger.entities; import android.annotation.SuppressLint; import android.support.annotation.NonNull; import android.support.annotation.Nullable; +import android.text.TextUtils; import java.util.ArrayList; import java.util.Collections; @@ -382,7 +383,12 @@ public class MucOptions { } else if (!conversation.getJid().isBareJid()) { return conversation.getJid().getResource(); } else { - return JidHelper.localPartOrFallback(account.getJid()); + final String displayName = account.getDisplayName(); + if (TextUtils.isEmpty(displayName)) { + return JidHelper.localPartOrFallback(account.getJid()); + } else { + return displayName; + } } } |