Commit ca85411a authored by Maxime Buquet's avatar Maxime Buquet Committed by mathieui

affiliations: Use InfoMessage in add_message call

Signed-off-by: Maxime Buquet's avatarMaxime “pep” Buquet <pep@bouah.net>
parent 4eb395c2
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment