don't override assigned GPG key. Fixes #7111

This commit is contained in:
Yann Leboulanger 2012-02-21 23:53:49 +01:00
parent 4e3300de7d
commit fb19adb4d1
1 changed files with 7 additions and 1 deletions

View File

@ -893,6 +893,12 @@ class ConnectionHandlersBase:
obj.contact.show = obj.show obj.contact.show = obj.show
obj.contact.status = obj.status obj.contact.status = obj.status
obj.contact.priority = obj.prio obj.contact.priority = obj.prio
attached_keys = gajim.config.get_per('accounts', account,
'attached_gpg_keys').split()
if jid in attached_keys:
obj.contact.keyID = attached_keys[attached_keys.index(jid) + 1]
else:
# Do not override assigned key
obj.contact.keyID = obj.keyID obj.contact.keyID = obj.keyID
if obj.timestamp: if obj.timestamp:
obj.contact.last_status_time = obj.timestamp obj.contact.last_status_time = obj.timestamp