Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gajim-plugins
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
56
Issues
56
List
Boards
Labels
Service Desk
Milestones
Merge Requests
8
Merge Requests
8
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gajim
gajim-plugins
Commits
89dbc5a8
Commit
89dbc5a8
authored
Jun 30, 2018
by
Philipp Hörist
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[omemo] Allow MUC conversations without other participants
Fixes #267
parent
af45dd3b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
11 deletions
+4
-11
omemo/omemo/state.py
omemo/omemo/state.py
+4
-8
omemo/omemoplugin.py
omemo/omemoplugin.py
+0
-3
No files found.
omemo/omemo/state.py
View file @
89dbc5a8
...
...
@@ -281,10 +281,6 @@ class OmemoState:
devices_list
=
self
.
device_list_for
(
jid
,
True
)
if
len
(
devices_list
)
==
0
:
log
.
error
(
'No known devices'
)
return
payload
,
tag
=
encrypt
(
key
,
iv
,
plaintext
)
key
+=
tag
...
...
@@ -315,10 +311,6 @@ class OmemoState:
log
.
warning
(
'Failed to find key for device '
+
str
(
rid
))
encrypted_jids
.
append
(
jid_to
)
if
len
(
encrypted_keys
)
==
0
:
log_msg
=
'Encrypted keys empty'
log
.
error
(
log_msg
)
raise
NoValidSessions
(
log_msg
)
my_other_devices
=
set
(
self
.
own_devices
)
-
set
({
self
.
own_device_id
})
# Encrypt the message key with for each of our own devices
...
...
@@ -336,6 +328,10 @@ class OmemoState:
log
.
exception
(
'ERROR:'
)
log
.
warning
(
'Failed to find key for device '
+
str
(
dev
))
if
not
encrypted_keys
:
log
.
error
(
'Encrypted keys empty'
)
raise
NoValidSessions
(
'Encrypted keys empty'
)
result
=
{
'sid'
:
self
.
own_device_id
,
'keys'
:
encrypted_keys
,
'jid'
:
jid
,
...
...
omemo/omemoplugin.py
View file @
89dbc5a8
...
...
@@ -236,11 +236,8 @@ class OmemoPlugin(GajimPlugin):
if
isinstance
(
chat_control
,
GroupchatControl
):
room
=
chat_control
.
room_jid
missing
=
True
own_jid
=
app
.
get_jid_from_account
(
account
)
for
nick
in
con
.
groupchat
[
room
]:
real_jid
=
con
.
groupchat
[
room
][
nick
]
if
real_jid
==
own_jid
:
continue
if
not
con
.
are_keys_missing
(
real_jid
):
missing
=
False
if
missing
:
...
...
Philipp Hörist
@lovetox
mentioned in merge request
!86 (closed)
·
Jun 30, 2018
mentioned in merge request
!86 (closed)
mentioned in merge request !86
Toggle commit list
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