summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxime “pep” Buquet <pep@bouah.net>2020-04-14 22:50:48 +0200
committermathieui <mathieui@mathieui.net>2020-05-09 19:46:17 +0200
commitca85411af06c59ec63b9cc2c0b2b2f398da79e8a (patch)
tree135acd2d1ed2a4e7e382d9bd4f574ef6f54a023e
parent4eb395c215511920271f4ceb5590217000c340ab (diff)
downloadpoezio-ca85411af06c59ec63b9cc2c0b2b2f398da79e8a.tar.gz
poezio-ca85411af06c59ec63b9cc2c0b2b2f398da79e8a.tar.bz2
poezio-ca85411af06c59ec63b9cc2c0b2b2f398da79e8a.tar.xz
poezio-ca85411af06c59ec63b9cc2c0b2b2f398da79e8a.zip
affiliations: Use InfoMessage in add_message call
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
-rw-r--r--poezio/tabs/muctab.py16
1 files changed, 9 insertions, 7 deletions
diff --git a/poezio/tabs/muctab.py b/poezio/tabs/muctab.py
index e1dc9dcf..f0c055b1 100644
--- a/poezio/tabs/muctab.py
+++ b/poezio/tabs/muctab.py
@@ -1651,16 +1651,18 @@ class MucTab(ChatTab):
if all_errors:
self.add_message(
- 'Can\'t access affiliations',
- highlight=True,
- nickname='Error',
- nick_color=theme.COLOR_ERROR_MSG,
+ Message(
+ 'Can\'t access affiliations',
+ highlight=True,
+ nickname='Error',
+ nick_color=theme.COLOR_ERROR_MSG,
+ ),
typ=2,
)
self.core.refresh_window()
return None
- self._text_buffer.add_message('Affiliations')
+ self._text_buffer.add_message(InfoMessage('Affiliations'))
for iq in iqs:
if isinstance(iq, (IqError, IqTimeout)):
continue
@@ -1673,12 +1675,12 @@ class MucTab(ChatTab):
affiliation = items[0].get('affiliation')
aff_char = aff_colors[affiliation]
self._text_buffer.add_message(
- ' %s%s' % (aff_char, affiliation.capitalize()),
+ InfoMessage(' %s%s' % (aff_char, affiliation.capitalize())),
)
items = map(lambda i: i.get('jid'), items)
for ajid in sorted(items):
- self._text_buffer.add_message(' %s' % ajid)
+ self._text_buffer.add_message(InfoMessage(' %s' % ajid))
self.core.refresh_window()
return None