fixed conference naming for joined people not in your contact list

This commit is contained in:
Christian Schneppe 2017-09-04 20:33:13 +02:00
parent c857128445
commit 62885d86d3

View file

@ -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();