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
d4af2b7d
Commit
d4af2b7d
authored
Feb 24, 2019
by
Philipp Hörist
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[omemo] Fix encryption messages to self
parent
49ffa7a3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
4 deletions
+5
-4
omemo/backend/devices.py
omemo/backend/devices.py
+2
-3
omemo/backend/state.py
omemo/backend/state.py
+3
-1
No files found.
omemo/backend/devices.py
View file @
d4af2b7d
...
...
@@ -93,7 +93,7 @@ class DeviceManager:
raise
NoDevicesFound
devices_for_encryption
+=
self
.
_get_own_devices_for_encryption
()
return
devices_for_encryption
return
set
(
devices_for_encryption
)
def
_get_devices_for_muc_encryption
(
self
,
jid
):
devices_for_encryption
=
[]
...
...
@@ -103,8 +103,7 @@ class DeviceManager:
def
_get_own_devices_for_encryption
(
self
):
devices_for_encryption
=
[]
own_devices
=
self
.
get_devices
(
self
.
_own_jid
)
own_devices
.
discard
(
self
.
own_device
)
own_devices
=
self
.
get_devices
(
self
.
_own_jid
,
without_self
=
True
)
for
device
in
own_devices
:
if
self
.
_storage
.
isTrusted
(
self
.
_own_jid
,
device
):
devices_for_encryption
.
append
((
self
.
_own_jid
,
device
))
...
...
omemo/backend/state.py
View file @
d4af2b7d
...
...
@@ -189,7 +189,9 @@ class OmemoState(DeviceManager):
log
.
exception
(
'Failed to encrypt'
)
continue
recipients
=
set
(
whisper_messages
.
keys
())
-
set
([
self
.
_own_jid
])
recipients
=
set
(
whisper_messages
.
keys
())
if
jid
!=
self
.
_own_jid
:
recipients
-=
set
([
self
.
_own_jid
])
if
not
recipients
:
log
.
error
(
'Encrypted keys empty'
)
return
...
...
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