ADD Omemo default support (#1476)
This commit is contained in:
parent
a16c068313
commit
b163d05323
|
@ -38,6 +38,7 @@
|
|||
- #1445: Participants list uses big font in embedded mode
|
||||
- #1455: Avatar in controlbox status-view not updated
|
||||
- #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
|
||||
- #1495: Mentions should always include a URI attribute
|
||||
- #1502: Fatal error when using prebind
|
||||
|
|
|
@ -1105,6 +1105,13 @@ with.
|
|||
});
|
||||
|
||||
|
||||
omemo_default
|
||||
-------------
|
||||
|
||||
* Default: ``false``
|
||||
|
||||
Use OMEMO encryption by default when the chat supports it.
|
||||
|
||||
ping_interval
|
||||
-------------
|
||||
|
||||
|
|
|
@ -84,6 +84,9 @@ converse.plugins.add('converse-omemo', {
|
|||
|
||||
initialize () {
|
||||
const { _converse } = this.__super__;
|
||||
_converse.api.settings.update({
|
||||
'omemo_default': false,
|
||||
});
|
||||
this.debouncedRender = _.debounce(this.render, 50);
|
||||
this.devicelist = _converse.devicelists.get(_converse.bare_jid);
|
||||
this.devicelist.devices.on('change:bundle', this.debouncedRender, this);
|
||||
|
@ -1227,6 +1230,9 @@ converse.plugins.add('converse-omemo', {
|
|||
supported = await _converse.contactHasOMEMOSupport(chatbox.get('jid'));
|
||||
}
|
||||
chatbox.set('omemo_supported', supported);
|
||||
if (supported && _converse.omemo_default) {
|
||||
chatbox.set('omemo_active', true);
|
||||
}
|
||||
}
|
||||
|
||||
_converse.api.waitUntil('chatBoxesInitialized').then(() =>
|
||||
|
|
Loading…
Reference in New Issue
Block a user