Commit 3e7c8655 authored by JC Brand's avatar JC Brand

Add a `<store>` hint to OMEMO messages.

updates #497
parent 15a4bcd1
...@@ -194,6 +194,7 @@ ...@@ -194,6 +194,7 @@
`</header>`+ `</header>`+
`<payload>${sent_stanza.nodeTree.querySelector('payload').textContent}</payload>`+ `<payload>${sent_stanza.nodeTree.querySelector('payload').textContent}</payload>`+
`</encrypted>`+ `</encrypted>`+
`<store xmlns='urn:xmpp:hints'/>`+
`</message>`); `</message>`);
// Test reception of an encrypted message // Test reception of an encrypted message
...@@ -327,15 +328,6 @@ ...@@ -327,15 +328,6 @@
})); }));
it("will add processing hints to sent out encrypted <message> stanzas",
mock.initConverseWithPromises(
null, ['rosterGroupsFetched'], {},
function (done, _converse) {
// TODO
done();
}));
it("updates device lists based on PEP messages", it("updates device lists based on PEP messages",
mock.initConverseWithPromises( mock.initConverseWithPromises(
null, ['rosterGroupsFetched'], {}, null, ['rosterGroupsFetched'], {},
......
...@@ -410,8 +410,12 @@ ...@@ -410,8 +410,12 @@
.map(device => this.encryptKey(obj.key_and_tag, device)); .map(device => this.encryptKey(obj.key_and_tag, device));
return Promise.all(promises) return Promise.all(promises)
.then((dicts) => this.addKeysToMessageStanza(stanza, dicts, obj.iv)) .then(dicts => this.addKeysToMessageStanza(stanza, dicts, obj.iv))
.then((stanza) => stanza.c('payload').t(obj.payload)) .then(stanza => {
stanza.c('payload').t(obj.payload).up().up();
stanza.c('store', {'xmlns': Strophe.NS.HINTS});
return stanza;
});
}); });
}, },
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment