properly show contact name in muc

This commit is contained in:
kosyak 2024-06-02 20:31:20 +02:00
parent 3f43dc6d5f
commit e745dae1dc

View file

@ -519,10 +519,14 @@ public class UIHelper {
if (message.getStatus() == Message.STATUS_RECEIVED) {
final Contact contact = message.getContact();
if (conversation.getMode() == Conversation.MODE_MULTI) {
if (contact != null) {
String mucCounterpart = getDisplayedMucCounterpart(message.getCounterpart());
if (!mucCounterpart.isEmpty()) {
return mucCounterpart;
} else if (contact != null) {
return contact.getDisplayName();
} else {
return getDisplayedMucCounterpart(message.getCounterpart());
return mucCounterpart;
}
} else {
return contact != null ? contact.getDisplayName() : "";