Commit 9a8ca991 authored by Daniel Brötzmann's avatar Daniel Brötzmann Committed by Philipp Hörist
Browse files

Roster: Show group chat description instead of topic

parent 6dacbe4c
......@@ -1205,17 +1205,23 @@ def draw_contact(self, jid, account, selected=False, focus=False,
# add status msg, if not empty, under contact name in
# the treeview
if contact.status and app.config.get('show_status_msgs_in_roster'):
status = contact.status.strip()
if status != '':
status = helpers.reduce_chars_newlines(status,
# escape markup entities and make them small
# italic
name += ('\n<span size="small" style="italic" '
if app.config.get('show_status_msgs_in_roster'):
status_span = '\n<span size="small" style="italic" ' \
if contact.is_groupchat:
disco_info = app.logger.get_last_disco_info(contact.jid)
if disco_info is not None:
description = disco_info.muc_description
if description:
name += status_span.format(
elif contact.status:
status = contact.status.strip()
if status != '':
status = helpers.reduce_chars_newlines(
status, max_lines=1)
name += status_span.format(
icon_name = helpers.get_icon_name_to_show(contact, account)
# look if another resource has awaiting events
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