do not send "I'm status" status message when we don't use gpg

This commit is contained in:
Yann Leboulanger 2005-09-08 07:10:59 +00:00
parent 90cb506c3c
commit f1fb1a13b6
2 changed files with 6 additions and 4 deletions

View File

@ -1476,11 +1476,14 @@ class Connection:
return -1
sshow = helpers.get_xmpp_show(show)
if not msg:
msg = ''
keyID = gajim.config.get_per('accounts', self.name, 'keyid')
if keyID and USE_GPG and not msg:
lowered_uf_status_msg = helpers.get_uf_show(show).lower()
if lowered_uf_status_msg == _('invisible'): # do not show I'm invisible!
# do not show I'm invisible!
if lowered_uf_status_msg == _('invisible'):
lowered_uf_status_msg = _('offline')
msg = _("I'm %s") % lowered_uf_status_msg
signed = ''
if not auto and not show == 'offline':
signed = self.get_signed_msg(msg)

View File

@ -1258,8 +1258,7 @@ _('If "%s" accepts this request you will know his status.') %jid)
def get_status_message(self, show):
if (show == 'online' and not gajim.config.get('ask_online_status')) or \
(show == 'offline' and not gajim.config.get('ask_offline_status')):
lowered_uf_status_msg = helpers.get_uf_show(show).lower()
return _("I'm %s") % lowered_uf_status_msg
return ''
dlg = dialogs.ChangeStatusMessageDialog(self.plugin, show)
message = dlg.run()
return message