diff options
Diffstat (limited to 'main/src/ui/util')
-rw-r--r-- | main/src/ui/util/helper.vala | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/main/src/ui/util/helper.vala b/main/src/ui/util/helper.vala index 9472c965..e2c8840f 100644 --- a/main/src/ui/util/helper.vala +++ b/main/src/ui/util/helper.vala @@ -59,7 +59,13 @@ public static string get_conversation_display_name(StreamInteractor stream_inter } public static string get_display_name(StreamInteractor stream_interactor, Jid jid, Account account) { - if (stream_interactor.get_module(MucManager.IDENTITY).is_groupchat_occupant(jid, account)) { + if (stream_interactor.get_module(MucManager.IDENTITY).is_groupchat(jid, account)) { + string room_name = stream_interactor.get_module(MucManager.IDENTITY).get_room_name(account, jid); + if (room_name != null) { + return room_name; + } + return jid.bare_jid.to_string(); + } else if (stream_interactor.get_module(MucManager.IDENTITY).is_groupchat_occupant(jid, account)) { return jid.resourcepart; } else { if (jid.equals_bare(account.bare_jid)) { |