diff options
author | sualko <klaus@jsxc.org> | 2021-08-26 17:59:58 +0300 |
---|---|---|
committer | sualko <klaus@jsxc.org> | 2021-08-26 18:17:21 +0300 |
commit | 5e8773c32f2fc52b1557e6d4d94efbf4ad81e83d (patch) | |
tree | 007ef2fca53df0437e99c0ed07ea2490dca8d4a5 | |
parent | 0398680c7ed2454045597672fcde1fb59dd72b06 (diff) |
fix(omemo): info msg for contacts without omemo
-rw-r--r-- | src/plugins/omemo/Plugin.ts | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/plugins/omemo/Plugin.ts b/src/plugins/omemo/Plugin.ts index 1c5eb76f..4964a76d 100644 --- a/src/plugins/omemo/Plugin.ts +++ b/src/plugins/omemo/Plugin.ts @@ -114,9 +114,16 @@ export default class OMEMOPlugin extends EncryptionPlugin { private async refreshDeviceList(contact: IContact) { let pepService = this.pluginAPI.getConnection().getPEPService(); - let stanza = await pepService.retrieveItems(NS_DEVICELIST, contact.getJid().bare); - this.onDeviceListUpdate(stanza); + try { + let stanza = await pepService.retrieveItems(NS_DEVICELIST, contact.getJid().bare); + + this.onDeviceListUpdate(stanza); + } catch(err) { + this.pluginAPI.Log.debug('Can not retrieve device list', err); + + return false; + } return this.getOmemo().isSupported(contact); } |