From 1dbdfce11b7f988827d563c3ebaf5d975a94ee48 Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Mon, 2 Mar 2009 17:41:51 +0000 Subject: [PATCH] [Dicson] don't take into account ask_on(ff)line_status when we send a custon suatus. Fixes #4828 --- src/roster_window.py | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/roster_window.py b/src/roster_window.py index df4849298..573dd24e6 100644 --- a/src/roster_window.py +++ b/src/roster_window.py @@ -2064,15 +2064,20 @@ class RosterWindow: if sys.platform == 'darwin': self.make_menu(force=True) - def get_status_message(self, show, on_response): + def get_status_message(self, show, on_response, always_ask=False): + ''' get the status message by: + 1/ looking in default status message + 2/ asking to user if needed depending on ask_on(ff)line_status and + always_ask + ''' if show in gajim.config.get_per('defaultstatusmsg'): if gajim.config.get_per('defaultstatusmsg', show, 'enabled'): on_response(gajim.config.get_per('defaultstatusmsg', show, 'message')) return - if (show == 'online' and not gajim.config.get('ask_online_status')) or \ - (show in ('offline', 'invisible') - and not gajim.config.get('ask_offline_status')): + if not always_ask and ((show == 'online' and not gajim.config.get( + 'ask_online_status')) or (show in ('offline', 'invisible') and not \ + gajim.config.get('ask_offline_status'))): on_response('') return @@ -3166,7 +3171,7 @@ class RosterWindow: jid += '/' + contact.resource self.send_status(account, show, message, to=jid) - self.get_status_message(show, on_response) + self.get_status_message(show, on_response, always_ask=True) def on_status_combobox_changed(self, widget): '''When we change our status via the combobox'''