From 4341797f14db0665c774c3472f29e23b56c3325c Mon Sep 17 00:00:00 2001 From: "Alexander \"PapaTutuWawa" Date: Wed, 14 Sep 2022 22:02:35 +0200 Subject: [PATCH] fix: Commit the restored ratchet --- lib/src/omemo/sessionmanager.dart | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/src/omemo/sessionmanager.dart b/lib/src/omemo/sessionmanager.dart index 8953ace..cbc5f5a 100644 --- a/lib/src/omemo/sessionmanager.dart +++ b/lib/src/omemo/sessionmanager.dart @@ -304,6 +304,15 @@ class OmemoSessionManager { await _lock.synchronized(() { print('RESTORING RATCHETS'); _ratchetMap[mapKey] = oldRatchet; + + // Commit the ratchet + _eventStreamController.add( + RatchetModifiedEvent( + mapKey.jid, + mapKey.deviceId, + oldRatchet, + ), + ); }); }