diff --git a/lib/src/omemo/sessionmanager.dart b/lib/src/omemo/sessionmanager.dart index c8c6a76..ab4fb4a 100644 --- a/lib/src/omemo/sessionmanager.dart +++ b/lib/src/omemo/sessionmanager.dart @@ -415,13 +415,7 @@ class OmemoSessionManager { /// Returns the device map, i.e. the mapping of bare Jid to its device identifiers /// we have built sessions with. Future>> getDeviceMap() async { - Map>? map; - - await _lock.synchronized(() async { - map = _deviceMap; - }); - - return map!; + return _lock.synchronized(() => _deviceMap); } /// Removes the ratchet identified by [jid] and [deviceId] from the session manager.