Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Jens Korte
gajim-plugins
Commits
4fee27c2
Commit
4fee27c2
authored
Jul 15, 2018
by
Philipp Hörist
Browse files
[pgp] Prepare for future Gajim changes
parent
3f4ae27a
Changes
1
Hide whitespace changes
Inline
Side-by-side
pgp/pgpplugin.py
View file @
4fee27c2
...
...
@@ -29,8 +29,7 @@ from gi.repository import GLib
from
gajim
import
dialogs
from
gajim.common
import
app
from
gajim.common.connection_handlers_events
import
(
MessageNotSentEvent
,
MessageReceivedEvent
,
MamMessageReceivedEvent
)
from
gajim.common.connection_handlers_events
import
MessageNotSentEvent
from
gajim.plugins
import
GajimPlugin
log
=
logging
.
getLogger
(
'gajim.plugin_system.oldpgp'
)
...
...
@@ -147,10 +146,15 @@ class OldPGPPlugin(GajimPlugin):
# Another Plugin already decrypted the message
return
account
=
conn
.
name
if
isinstance
(
obj
,
M
essage
R
eceived
Event
)
:
if
obj
.
name
==
'm
essage
-r
eceived
'
:
enc_tag
=
obj
.
stanza
.
getTag
(
'x'
,
namespace
=
nbxmpp
.
NS_ENCRYPTED
)
elif
isinstance
(
obj
,
MamMessageReceivedEvent
):
enc_tag
=
obj
.
msg_
.
getTag
(
'x'
,
namespace
=
nbxmpp
.
NS_ENCRYPTED
)
elif
obj
.
name
==
'mam-message-received'
:
# Compatibility for Gajim 1.0.3
if
hasattr
(
obj
,
'message'
):
message
=
obj
.
message
else
:
message
=
obj
.
msg_
enc_tag
=
message
.
getTag
(
'x'
,
namespace
=
nbxmpp
.
NS_ENCRYPTED
)
else
:
return
if
enc_tag
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment