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
c4ac73cc
Commit
c4ac73cc
authored
Aug 18, 2018
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
prekey id must be an int.
parent
ca9229a9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
10 deletions
+9
-10
src/converse-omemo.js
src/converse-omemo.js
+9
-10
No files found.
src/converse-omemo.js
View file @
c4ac73cc
...
...
@@ -475,16 +475,15 @@
'
identity_keypair
'
:
identity_keypair
,
'
prekeys
'
:
{}
};
const
signed_prekey_id
=
'
0
'
;
libsignal
.
KeyHelper
.
generateSignedPreKey
(
identity_keypair
,
signed_prekey_id
)
.
then
((
signed_prekey
)
=>
{
data
[
'
signed_prekey
'
]
=
signed_prekey
;
const
key_promises
=
_
.
map
(
_
.
range
(
0
,
_converse
.
NUM_PREKEYS
),
(
id
)
=>
libsignal
.
KeyHelper
.
generatePreKey
(
id
));
Promise
.
all
(
key_promises
).
then
((
keys
)
=>
{
data
[
'
prekeys
'
]
=
keys
;
resolve
(
data
)
});
}).
catch
(
_
.
partial
(
_converse
.
log
,
_
,
Strophe
.
LogLevel
.
ERROR
));
libsignal
.
KeyHelper
.
generateSignedPreKey
(
identity_keypair
,
0
)
.
then
((
signed_prekey
)
=>
{
data
[
'
signed_prekey
'
]
=
signed_prekey
;
const
key_promises
=
_
.
map
(
_
.
range
(
0
,
_converse
.
NUM_PREKEYS
),
(
id
)
=>
libsignal
.
KeyHelper
.
generatePreKey
(
id
));
Promise
.
all
(
key_promises
).
then
((
keys
)
=>
{
data
[
'
prekeys
'
]
=
keys
;
resolve
(
data
)
});
}).
catch
(
_
.
partial
(
_converse
.
log
,
_
,
Strophe
.
LogLevel
.
ERROR
));
});
}).
catch
(
_
.
partial
(
_converse
.
log
,
_
,
Strophe
.
LogLevel
.
ERROR
));
}
...
...
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