Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
G
gajim-plugins
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
gajim
gajim-plugins
Commits
d4af2b7d
Commit
d4af2b7d
authored
6 years ago
by
Philipp Hörist
Browse files
Options
Downloads
Patches
Plain Diff
[omemo] Fix encryption messages to self
parent
49ffa7a3
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
omemo/backend/devices.py
+2
-3
2 additions, 3 deletions
omemo/backend/devices.py
omemo/backend/state.py
+3
-1
3 additions, 1 deletion
omemo/backend/state.py
with
5 additions
and
4 deletions
omemo/backend/devices.py
+
2
−
3
View file @
d4af2b7d
...
@@ -93,7 +93,7 @@ class DeviceManager:
...
@@ -93,7 +93,7 @@ class DeviceManager:
raise
NoDevicesFound
raise
NoDevicesFound
devices_for_encryption
+=
self
.
_get_own_devices_for_encryption
()
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
):
def
_get_devices_for_muc_encryption
(
self
,
jid
):
devices_for_encryption
=
[]
devices_for_encryption
=
[]
...
@@ -103,8 +103,7 @@ class DeviceManager:
...
@@ -103,8 +103,7 @@ class DeviceManager:
def
_get_own_devices_for_encryption
(
self
):
def
_get_own_devices_for_encryption
(
self
):
devices_for_encryption
=
[]
devices_for_encryption
=
[]
own_devices
=
self
.
get_devices
(
self
.
_own_jid
)
own_devices
=
self
.
get_devices
(
self
.
_own_jid
,
without_self
=
True
)
own_devices
.
discard
(
self
.
own_device
)
for
device
in
own_devices
:
for
device
in
own_devices
:
if
self
.
_storage
.
isTrusted
(
self
.
_own_jid
,
device
):
if
self
.
_storage
.
isTrusted
(
self
.
_own_jid
,
device
):
devices_for_encryption
.
append
((
self
.
_own_jid
,
device
))
devices_for_encryption
.
append
((
self
.
_own_jid
,
device
))
...
...
This diff is collapsed.
Click to expand it.
omemo/backend/state.py
+
3
−
1
View file @
d4af2b7d
...
@@ -189,7 +189,9 @@ class OmemoState(DeviceManager):
...
@@ -189,7 +189,9 @@ class OmemoState(DeviceManager):
log
.
exception
(
'
Failed to encrypt
'
)
log
.
exception
(
'
Failed to encrypt
'
)
continue
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
:
if
not
recipients
:
log
.
error
(
'
Encrypted keys empty
'
)
log
.
error
(
'
Encrypted keys empty
'
)
return
return
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment