Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
converse.js
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
converse.js
Commits
029fb6d6
Commit
029fb6d6
authored
Oct 18, 2018
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make sure we have a device to publish before doing so
parent
94a1852b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
13 deletions
+14
-13
CHANGES.md
CHANGES.md
+1
-0
src/converse-omemo.js
src/converse-omemo.js
+13
-13
No files found.
CHANGES.md
View file @
029fb6d6
...
...
@@ -2,6 +2,7 @@
## 4.0.3 (Unreleased)
-
Bugfix. Converse continuously publishes an empty OMEMO devicelist for itself
-
Bugfix. Handler not triggered when submitting MUC password form 2nd time
-
Bugfix. MUC features weren't being refreshed when saving the config form
-
Don't show duplicate notification messages
...
...
src/converse-omemo.js
View file @
029fb6d6
...
...
@@ -855,8 +855,7 @@
if
(
collection
.
length
===
0
)
{
this
.
fetchDevicesFromServer
()
.
then
(
ids
=>
this
.
publishCurrentDevice
(
ids
))
.
then
(
resolve
)
.
catch
(
resolve
);
.
finally
(
resolve
)
}
else
{
resolve
();
}
...
...
@@ -867,20 +866,21 @@
return
this
.
_devices_promise
;
},
publishCurrentDevice
(
device_ids
)
{
async
publishCurrentDevice
(
device_ids
)
{
if
(
this
.
get
(
'
jid
'
)
!==
_converse
.
bare_jid
)
{
// We only publish for ourselves.
return
Promise
.
resolve
();
return
}
await
restoreOMEMOSession
();
let
device_id
=
_converse
.
omemo_store
.
get
(
'
device_id
'
);
if
(
!
this
.
devices
.
findWhere
({
'
id
'
:
device_id
}))
{
// Generate a new bundle if we cannot find our device
await
_converse
.
omemo_store
.
generateBundle
();
device_id
=
_converse
.
omemo_store
.
get
(
'
device_id
'
);
}
return
restoreOMEMOSession
()
.
then
(()
=>
{
const
device_id
=
_converse
.
omemo_store
.
get
(
'
device_id
'
),
own_device
=
this
.
devices
.
findWhere
({
'
id
'
:
device_id
});
if
(
!
_
.
includes
(
device_ids
,
device_id
))
{
return
this
.
publishDevices
();
}
});
},
fetchDevicesFromServer
()
{
...
...
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