diff --git a/packages/moxxmpp/lib/src/xeps/xep_0384/xep_0384.dart b/packages/moxxmpp/lib/src/xeps/xep_0384/xep_0384.dart index b1c736f..6ea142a 100644 --- a/packages/moxxmpp/lib/src/xeps/xep_0384/xep_0384.dart +++ b/packages/moxxmpp/lib/src/xeps/xep_0384/xep_0384.dart @@ -357,6 +357,11 @@ abstract class BaseOmemoManager extends XmppManagerBase { other['encryption_error_devices'] = result.deviceEncryptionErrors; return state.copyWith( other: other, + // If we have no device list for toJid, then the contact most likely does not + // support OMEMO:2 + cancelReason: result.jidEncryptionErrors[toJid.toString()] is NoKeyMaterialAvailableException ? + OmemoNotSupportedForContactException() : + null, cancel: true, ); }