fixed conference naming for joined people not in your contact list
This commit is contained in:
parent
65d4f50b02
commit
dd5e321247
|
@ -656,8 +656,14 @@ public class MucOptions {
|
||||||
Contact contact = user.getContact();
|
Contact contact = user.getContact();
|
||||||
if (contact != null && !contact.getDisplayName().isEmpty()) {
|
if (contact != null && !contact.getDisplayName().isEmpty()) {
|
||||||
builder.append(contact.getDisplayName().split("\\s+")[0]);
|
builder.append(contact.getDisplayName().split("\\s+")[0]);
|
||||||
} else if (user.getName() != null){
|
} else {
|
||||||
builder.append(user.getName());
|
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();
|
return builder.toString();
|
||||||
|
|
Loading…
Reference in a new issue