aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/main/java/de/pixart/messenger/entities/MucOptions.java10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/main/java/de/pixart/messenger/entities/MucOptions.java b/src/main/java/de/pixart/messenger/entities/MucOptions.java
index 3e2349c9c..6560e3bb7 100644
--- a/src/main/java/de/pixart/messenger/entities/MucOptions.java
+++ b/src/main/java/de/pixart/messenger/entities/MucOptions.java
@@ -663,8 +663,14 @@ public class MucOptions {
Contact contact = user.getContact();
if (contact != null && !contact.getDisplayName().isEmpty()) {
builder.append(contact.getDisplayName().split("\\s+")[0]);
- } else if (user.getName() != null) {
- builder.append(user.getName());
+ } else {
+ final String name = user.getName();
+ final Jid jid = user.getRealJid();
+ if (name != null) {
+ builder.append(name.split("\\s+")[0]);
+ } else if (jid != null) {
+ builder.append(jid.getLocalpart());
+ }
}
}
return builder.toString();