diff options
author | Philipp Hörist <forenjunkie@chello.at> | 2017-11-19 21:29:13 +0300 |
---|---|---|
committer | Philipp Hörist <forenjunkie@chello.at> | 2017-11-20 01:16:33 +0300 |
commit | 14dc34b3fb46fba6a7bc1aeb92aa571321321224 (patch) | |
tree | 15700b570fa37e85b2b3a2fdeffaac3f829bc1d9 | |
parent | 9741339913e73a2c4432c3372c8c84145bf7987d (diff) |
[pgp] Adapt to Gajim MAM changes
-rw-r--r-- | pgp/pgpplugin.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/pgp/pgpplugin.py b/pgp/pgpplugin.py index 770827b..4610b2e 100644 --- a/pgp/pgpplugin.py +++ b/pgp/pgpplugin.py @@ -30,7 +30,7 @@ from gi.repository import GLib from gajim import dialogs from gajim.common import app from gajim.common.connection_handlers_events import ( - MessageNotSentEvent, MessageReceivedEvent) + MessageNotSentEvent, MessageReceivedEvent, MamMessageReceivedEvent) from gajim.plugins import GajimPlugin log = logging.getLogger('gajim.plugin_system.oldpgp') @@ -136,8 +136,10 @@ class OldPGPPlugin(GajimPlugin): account = conn.name if isinstance(obj, MessageReceivedEvent): enc_tag = obj.stanza.getTag('x', namespace=nbxmpp.NS_ENCRYPTED) - else: + elif isinstance(obj, MamMessageReceivedEvent): enc_tag = obj.msg_.getTag('x', namespace=nbxmpp.NS_ENCRYPTED) + else: + return if enc_tag: encmsg = enc_tag.getData() key_id = app.config.get_per('accounts', account, 'keyid') |