From 202f9973208f2c30eba6fc085acfc2fb56109c18 Mon Sep 17 00:00:00 2001 From: Christian Pauly Date: Thu, 27 Feb 2020 08:52:45 +0000 Subject: [PATCH] Room fix block devices --- lib/src/room.dart | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/src/room.dart b/lib/src/room.dart index 68c6977..4f17d85 100644 --- a/lib/src/room.dart +++ b/lib/src/room.dart @@ -95,7 +95,7 @@ class Room { List deviceKeys = await getUserDeviceKeys(); _outboundGroupSessionDevices = []; for (DeviceKeys keys in deviceKeys) { - _outboundGroupSessionDevices.add(keys.deviceId); + if (!keys.blocked) _outboundGroupSessionDevices.add(keys.deviceId); } _outboundGroupSessionDevices.sort(); try { @@ -148,7 +148,7 @@ class Room { List deviceKeys = await getUserDeviceKeys(); List outboundGroupSessionDevices = []; for (DeviceKeys keys in deviceKeys) { - outboundGroupSessionDevices.add(keys.deviceId); + if (!keys.blocked) outboundGroupSessionDevices.add(keys.deviceId); } outboundGroupSessionDevices.sort(); if (outboundGroupSessionDevices.toString() == @@ -160,6 +160,9 @@ class Room { await client.storeAPI?.setItem( "/clients/${client.deviceID}/rooms/${this.id}/outbound_group_session", null); + await client.storeAPI?.setItem( + "/clients/${client.deviceID}/rooms/${this.id}/outbound_group_session_devices", + null); this._outboundGroupSession?.free(); this._outboundGroupSession = null; return true;