Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
gajim
gajim-plugins
Commits
1c0b571d
Commit
1c0b571d
authored
Oct 19, 2020
by
Philipp Hörist
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[omemo] Adapt to nbxmpp changes
parent
266aba14
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
omemo/modules/omemo.py
omemo/modules/omemo.py
+7
-4
No files found.
omemo/modules/omemo.py
View file @
1c0b571d
...
@@ -22,7 +22,7 @@ from pathlib import Path
...
@@ -22,7 +22,7 @@ from pathlib import Path
from
nbxmpp.namespaces
import
Namespace
from
nbxmpp.namespaces
import
Namespace
from
nbxmpp.protocol
import
NodeProcessed
from
nbxmpp.protocol
import
NodeProcessed
from
nbxmpp.protocol
import
JID
from
nbxmpp.protocol
import
JID
from
nbxmpp.
util
import
is_error_result
from
nbxmpp.
errors
import
StanzaError
from
nbxmpp.const
import
PresenceType
from
nbxmpp.const
import
PresenceType
from
nbxmpp.const
import
Affiliation
from
nbxmpp.const
import
Affiliation
from
nbxmpp.structs
import
StanzaHandler
from
nbxmpp.structs
import
StanzaHandler
...
@@ -320,9 +320,12 @@ class OMEMO(BaseModule):
...
@@ -320,9 +320,12 @@ class OMEMO(BaseModule):
callback
=
self
.
_on_affiliations_received
,
callback
=
self
.
_on_affiliations_received
,
user_data
=
room_jid
)
user_data
=
room_jid
)
def
_on_affiliations_received
(
self
,
result
,
room_jid
):
def
_on_affiliations_received
(
self
,
task
):
if
is_error_result
(
result
):
room_jid
=
task
.
get_user_data
()
self
.
_log
.
info
(
'Affiliation request failed: %s'
,
result
)
try
:
result
=
task
.
finish
()
except
StanzaError
as
error
:
self
.
_log
.
info
(
'Affiliation request failed: %s'
,
error
)
return
return
for
user_jid
in
result
.
users
:
for
user_jid
in
result
.
users
:
...
...
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