summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmmanuel Gil Peyrot <linkmauve@linkmauve.fr>2017-11-24 03:06:22 +0000
committerEmmanuel Gil Peyrot <linkmauve@linkmauve.fr>2017-11-24 03:06:22 +0000
commitb355098b4b8a267c38324b8db5e38268ba62c6a7 (patch)
tree848a0969230947639669e13e7281d8866996d0e8
parenteae2692647d98bf1a0610f7d2c837fe73c658788 (diff)
downloadpoezio-b355098b4b8a267c38324b8db5e38268ba62c6a7.tar.gz
poezio-b355098b4b8a267c38324b8db5e38268ba62c6a7.tar.bz2
poezio-b355098b4b8a267c38324b8db5e38268ba62c6a7.tar.xz
poezio-b355098b4b8a267c38324b8db5e38268ba62c6a7.zip
muctab: Display the bookmark name when available, instead of the localpart.
-rw-r--r--poezio/tabs/muctab.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/poezio/tabs/muctab.py b/poezio/tabs/muctab.py
index e08ac23a..0a5ee793 100644
--- a/poezio/tabs/muctab.py
+++ b/poezio/tabs/muctab.py
@@ -374,9 +374,13 @@ class MucTab(ChatTab):
return False
def get_nick(self):
- if not config.get('show_muc_jid'):
- return safeJID(self.name).user
- return self.name
+ if config.get('show_muc_jid'):
+ return self.name
+ bookmark = self.core.bookmarks[self.name]
+ if bookmark is not None and bookmark.name:
+ return bookmark.name
+ # TODO: send the disco#info identity name here, if it exists.
+ return safeJID(self.name).user
def get_text_window(self):
return self.text_win