summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxime Buquet <pep@bouah.net>2020-05-24 17:13:51 +0200
committerMaxime Buquet <pep@bouah.net>2020-05-24 17:13:51 +0200
commitdd0be85dceb4881d7100a4ef9522370c0c1b92e7 (patch)
treecde3a564d68cb5d6cad115e4db20dd61031282db
parent0c9f2ca39150a19c9120a6f050fe3a6db82de938 (diff)
parent6117c97a214acb396b21bd7954dfc6bb5e9f97f4 (diff)
downloadpoezio-dd0be85dceb4881d7100a4ef9522370c0c1b92e7.tar.gz
poezio-dd0be85dceb4881d7100a4ef9522370c0c1b92e7.tar.bz2
poezio-dd0be85dceb4881d7100a4ef9522370c0c1b92e7.tar.xz
poezio-dd0be85dceb4881d7100a4ef9522370c0c1b92e7.zip
Merge branch 'affiliation-info' into 'master'
Make /affiliation display in the info win, not in the muc win See merge request poezio/poezio!113
-rw-r--r--poezio/tabs/muctab.py21
1 files changed, 5 insertions, 16 deletions
diff --git a/poezio/tabs/muctab.py b/poezio/tabs/muctab.py
index 0df8eedc..7885991a 100644
--- a/poezio/tabs/muctab.py
+++ b/poezio/tabs/muctab.py
@@ -1667,19 +1667,10 @@ class MucTab(ChatTab):
}
if all_errors:
- self.add_message(
- Message(
- 'Can\'t access affiliations',
- highlight=True,
- nickname='Error',
- nick_color=theme.COLOR_ERROR_MSG,
- ),
- typ=2,
- )
- self.core.refresh_window()
+ self.core.information('Can’t access affiliations', 'Error')
return None
- self._text_buffer.add_message(InfoMessage('Affiliations'))
+ lines = ['Affiliations']
for iq in iqs:
if isinstance(iq, (IqError, IqTimeout)):
continue
@@ -1691,15 +1682,13 @@ class MucTab(ChatTab):
affiliation = items[0].get('affiliation')
aff_char = aff_colors[affiliation]
- self._text_buffer.add_message(
- InfoMessage(' %s%s' % (aff_char, affiliation.capitalize())),
- )
+ lines.append(' %s%s' % (aff_char, affiliation.capitalize()))
items = map(lambda i: i.get('jid'), items)
for ajid in sorted(items):
- self._text_buffer.add_message(InfoMessage(' %s' % ajid))
+ lines.append(' %s' % ajid)
- self.core.refresh_window()
+ self.core.information('\n'.join(lines), 'Info')
return None
@command_args_parser.raw