diff --git a/lib/src/omemo/sessionmanager.dart b/lib/src/omemo/sessionmanager.dart index 542e21a..c8c6a76 100644 --- a/lib/src/omemo/sessionmanager.dart +++ b/lib/src/omemo/sessionmanager.dart @@ -461,6 +461,12 @@ class OmemoSessionManager { }); } + /// Returns true if the ratchet for [jid] with device identifier [deviceId] is + /// acknowledged. Returns false if not. + Future isRatchetAcknowledged(String jid, int deviceId) async { + return _lock.synchronized(() => _ratchetMap[RatchetMapKey(jid, deviceId)]!.acknowledged); + } + /// Mark the ratchet for device [deviceId] from [jid] as acked. Future ratchetAcknowledged(String jid, int deviceId) async { await _lock.synchronized(() async {