diff --git a/example/omemo_dart_example.dart b/example/omemo_dart_example.dart index 405d465..23f7e05 100644 --- a/example/omemo_dart_example.dart +++ b/example/omemo_dart_example.dart @@ -145,6 +145,11 @@ void main() async { /// The text of the element, if it exists. If not, then the message might be /// a hearbeat, where no payload is sent. In that case, use null. payload, + + /// Since we did not receive this message due to a catch-up mechanism, like MAM, we + /// set this to false. If we, however, did use a catch-up mechanism, we must set this + /// to true to prevent the OPKs from being replaced. + false, ), ); diff --git a/lib/src/omemo/omemo.dart b/lib/src/omemo/omemo.dart index 34c226a..7e76f98 100644 --- a/lib/src/omemo/omemo.dart +++ b/lib/src/omemo/omemo.dart @@ -394,7 +394,7 @@ class OmemoManager { } else { // Check if we even have a ratchet if (!_ratchetMap.containsKey(ratchetKey)) { - // TODO: Check if we recently failed to build a session with the device + // TODO(Unknown): Check if we recently failed to build a session with the device // This causes omemo_dart to build a session with the device. if (!_deviceList[stanza.bareSenderJid]! .contains(stanza.senderDeviceId)) { @@ -517,8 +517,8 @@ class OmemoManager { bundle, ownDevice.ik, ); - // TODO: Track the failure and do not attempt to encrypt to this device - // on every send. + // TODO(Unknown): Track the failure and do not attempt to encrypt to this device + // on every send. if (kexResultRaw.isType()) { encryptionErrors.appendOrCreate( jid,