Commit b163d053 authored by Malcolm's avatar Malcolm Committed by JC Brand

ADD Omemo default support (#1476)

parent a16c0683
...@@ -38,6 +38,7 @@ ...@@ -38,6 +38,7 @@
- #1445: Participants list uses big font in embedded mode - #1445: Participants list uses big font in embedded mode
- #1455: Avatar in controlbox status-view not updated - #1455: Avatar in controlbox status-view not updated
- #1465: When highlighting a roster contact, they're incorrectly shown as online - #1465: When highlighting a roster contact, they're incorrectly shown as online
- #1476: Support OMEMO on by default for chats via a config variable
- #1494: Trim whitespace around messages - #1494: Trim whitespace around messages
- #1495: Mentions should always include a URI attribute - #1495: Mentions should always include a URI attribute
- #1502: Fatal error when using prebind - #1502: Fatal error when using prebind
......
...@@ -1105,6 +1105,13 @@ with. ...@@ -1105,6 +1105,13 @@ with.
}); });
omemo_default
-------------
* Default: ``false``
Use OMEMO encryption by default when the chat supports it.
ping_interval ping_interval
------------- -------------
......
...@@ -84,6 +84,9 @@ converse.plugins.add('converse-omemo', { ...@@ -84,6 +84,9 @@ converse.plugins.add('converse-omemo', {
initialize () { initialize () {
const { _converse } = this.__super__; const { _converse } = this.__super__;
_converse.api.settings.update({
'omemo_default': false,
});
this.debouncedRender = _.debounce(this.render, 50); this.debouncedRender = _.debounce(this.render, 50);
this.devicelist = _converse.devicelists.get(_converse.bare_jid); this.devicelist = _converse.devicelists.get(_converse.bare_jid);
this.devicelist.devices.on('change:bundle', this.debouncedRender, this); this.devicelist.devices.on('change:bundle', this.debouncedRender, this);
...@@ -1227,6 +1230,9 @@ converse.plugins.add('converse-omemo', { ...@@ -1227,6 +1230,9 @@ converse.plugins.add('converse-omemo', {
supported = await _converse.contactHasOMEMOSupport(chatbox.get('jid')); supported = await _converse.contactHasOMEMOSupport(chatbox.get('jid'));
} }
chatbox.set('omemo_supported', supported); chatbox.set('omemo_supported', supported);
if (supported && _converse.omemo_default) {
chatbox.set('omemo_active', true);
}
} }
_converse.api.waitUntil('chatBoxesInitialized').then(() => _converse.api.waitUntil('chatBoxesInitialized').then(() =>
......
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