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
5949d294
Commit
5949d294
authored
Sep 18, 2020
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
omemo: specify pubsub item id of 'current'
parent
87b69c1d
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
3 deletions
+4
-3
spec/omemo.js
spec/omemo.js
+2
-2
src/converse-omemo.js
src/converse-omemo.js
+1
-1
src/templates/profile_modal.js
src/templates/profile_modal.js
+1
-0
No files found.
spec/omemo.js
View file @
5949d294
...
@@ -833,7 +833,7 @@ describe("The OMEMO module", function() {
...
@@ -833,7 +833,7 @@ describe("The OMEMO module", function() {
`<iq from="romeo@montague.lit" id="
${
iq_stanza
.
getAttribute
(
`id`
)}
" type="set" xmlns="jabber:client">`
+
`<iq from="romeo@montague.lit" id="
${
iq_stanza
.
getAttribute
(
`id`
)}
" type="set" xmlns="jabber:client">`
+
`<pubsub xmlns="http://jabber.org/protocol/pubsub">`
+
`<pubsub xmlns="http://jabber.org/protocol/pubsub">`
+
`<publish node="eu.siacs.conversations.axolotl.devicelist">`
+
`<publish node="eu.siacs.conversations.axolotl.devicelist">`
+
`<item>`
+
`<item
id="current"
>`
+
`<list xmlns="eu.siacs.conversations.axolotl">`
+
`<list xmlns="eu.siacs.conversations.axolotl">`
+
`<device id="123456789"/>`
+
`<device id="123456789"/>`
+
`<device id="444"/>`
+
`<device id="444"/>`
+
...
@@ -1139,7 +1139,7 @@ describe("The OMEMO module", function() {
...
@@ -1139,7 +1139,7 @@ describe("The OMEMO module", function() {
`<iq from="romeo@montague.lit" id="
${
iq_stanza
.
getAttribute
(
`id`
)}
" type="set" xmlns="jabber:client">`
+
`<iq from="romeo@montague.lit" id="
${
iq_stanza
.
getAttribute
(
`id`
)}
" type="set" xmlns="jabber:client">`
+
`<pubsub xmlns="http://jabber.org/protocol/pubsub">`
+
`<pubsub xmlns="http://jabber.org/protocol/pubsub">`
+
`<publish node="eu.siacs.conversations.axolotl.devicelist">`
+
`<publish node="eu.siacs.conversations.axolotl.devicelist">`
+
`<item>`
+
`<item
id="current"
>`
+
`<list xmlns="eu.siacs.conversations.axolotl">`
+
`<list xmlns="eu.siacs.conversations.axolotl">`
+
`<device id="482886413b977930064a5888b92134fe"/>`
+
`<device id="482886413b977930064a5888b92134fe"/>`
+
`<device id="123456789"/>`
+
`<device id="123456789"/>`
+
...
...
src/converse-omemo.js
View file @
5949d294
...
@@ -1181,7 +1181,7 @@ converse.plugins.add('converse-omemo', {
...
@@ -1181,7 +1181,7 @@ converse.plugins.add('converse-omemo', {
* See: https://xmpp.org/extensions/xep-0384.html#usecases-announcing
* See: https://xmpp.org/extensions/xep-0384.html#usecases-announcing
*/
*/
publishDevices
()
{
publishDevices
()
{
const
item
=
$build
(
'
item
'
).
c
(
'
list
'
,
{
'
xmlns
'
:
Strophe
.
NS
.
OMEMO
})
const
item
=
$build
(
'
item
'
,
{
'
id
'
:
'
current
'
}
).
c
(
'
list
'
,
{
'
xmlns
'
:
Strophe
.
NS
.
OMEMO
})
this
.
devices
.
filter
(
d
=>
d
.
get
(
'
active
'
)).
forEach
(
d
=>
item
.
c
(
'
device
'
,
{
'
id
'
:
d
.
get
(
'
id
'
)}).
up
());
this
.
devices
.
filter
(
d
=>
d
.
get
(
'
active
'
)).
forEach
(
d
=>
item
.
c
(
'
device
'
,
{
'
id
'
:
d
.
get
(
'
id
'
)}).
up
());
const
options
=
{
'
pubsub#access_model
'
:
'
open
'
};
const
options
=
{
'
pubsub#access_model
'
:
'
open
'
};
return
api
.
pubsub
.
publish
(
null
,
Strophe
.
NS
.
OMEMO_DEVICELIST
,
item
,
options
,
false
);
return
api
.
pubsub
.
publish
(
null
,
Strophe
.
NS
.
OMEMO_DEVICELIST
,
item
,
options
,
false
);
...
...
src/templates/profile_modal.js
View file @
5949d294
...
@@ -65,6 +65,7 @@ const device_list = (o) => {
...
@@ -65,6 +65,7 @@ const device_list = (o) => {
}
}
// TODO: this needs to go as a component into the OMEMO plugin folder
const
omemo_page
=
(
o
)
=>
{
const
omemo_page
=
(
o
)
=>
{
const
i18n_fingerprint
=
__
(
"
This device's OMEMO fingerprint
"
);
const
i18n_fingerprint
=
__
(
"
This device's OMEMO fingerprint
"
);
const
i18n_generate
=
__
(
'
Generate new keys and fingerprint
'
);
const
i18n_generate
=
__
(
'
Generate new keys and fingerprint
'
);
...
...
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