aboutsummaryrefslogtreecommitdiff
path: root/main/src/ui/util
diff options
context:
space:
mode:
authorcodedust <codedust@users.noreply.github.com>2018-08-20 02:59:58 +0200
committerfiaxh <git@mx.ax.lt>2018-11-02 15:14:35 +0100
commit1e54a442ba78cd117c0262b9b5e83ef4438e5858 (patch)
tree025be91fe62a1284ac911a7919792afe2bce1ea2 /main/src/ui/util
parent4ad07fea47e9e3463e864673b9c601b304b05270 (diff)
downloaddino-1e54a442ba78cd117c0262b9b5e83ef4438e5858.tar.gz
dino-1e54a442ba78cd117c0262b9b5e83ef4438e5858.zip
Display room name in conversation selector and conversation titlebar
Diffstat (limited to 'main/src/ui/util')
-rw-r--r--main/src/ui/util/helper.vala8
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)) {