From 4aa265451dfebe3991fc0496bb76baa05d9faab8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20H=C3=B6rist?= Date: Sat, 5 Jan 2019 20:10:08 +0100 Subject: [PATCH] MUC: Use default value when printing the status --- gajim/groupchat_control.py | 5 ++++- gajim/privatechat_control.py | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/gajim/groupchat_control.py b/gajim/groupchat_control.py index 9ddc2cf15..dcb3515fd 100644 --- a/gajim/groupchat_control.py +++ b/gajim/groupchat_control.py @@ -1862,12 +1862,15 @@ class GroupchatControl(ChatControlBase): status = '' if status is None else ' (%s)' % status show = helpers.get_uf_show(event.properties.show.value) + status_default = app.config.get('print_status_muc_default') + if event.properties.is_muc_self_presence: message = _('You are now {show}{status}').format(show=show, status=status) self.print_conversation(message, 'info', graphics=False) - elif app.config.get_per('rooms', self.room_jid, 'print_status'): + elif app.config.get_per('rooms', self.room_jid, + 'print_status', status_default): message = _('{nick} is now {show}{status}').format(nick=nick, show=show, status=status) diff --git a/gajim/privatechat_control.py b/gajim/privatechat_control.py index 98228ab13..831530af3 100644 --- a/gajim/privatechat_control.py +++ b/gajim/privatechat_control.py @@ -135,12 +135,15 @@ class PrivateChatControl(ChatControl): status = '' if status is None else ' (%s)' % status show = helpers.get_uf_show(event.properties.show.value) + status_default = app.config.get('print_status_muc_default') + if event.properties.is_muc_self_presence: message = _('You are now {show}{status}').format(show=show, status=status) self.print_conversation(message, 'info') - elif app.config.get_per('rooms', self.room_name, 'print_status'): + elif app.config.get_per('rooms', self.room_name, + 'print_status', status_default): message = _('{nick} is now {show}{status}').format(nick=nick, show=show, status=status)