From 3fba9a55b3a8f68b4ecfeaf3cf0f626da3efcb9f Mon Sep 17 00:00:00 2001 From: td Date: Tue, 20 Feb 2024 06:54:11 +0530 Subject: [PATCH] chore: remove state events both in imp and preview events list --- lib/src/client.dart | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/lib/src/client.dart b/lib/src/client.dart index e2650f7e..2cd9d9a2 100644 --- a/lib/src/client.dart +++ b/lib/src/client.dart @@ -161,6 +161,12 @@ class Client extends MatrixApi { Set? verificationMethods, http.Client? httpClient, Set? importantStateEvents, + + /// You probably don't want to add state events which are also + /// in important state events to this list, or get ready to face + /// only having one event of that particular type in preLoad because + /// previewEvents are stored with stateKey '' not the actual state key + /// of your state event Set? roomPreviewLastEvents, this.pinUnreadRooms = false, this.pinInvitedRooms = true, @@ -216,8 +222,12 @@ class Client extends MatrixApi { EventTypes.CallAnswer, EventTypes.CallReject, EventTypes.CallHangup, - EventTypes.GroupCallPrefix, - EventTypes.GroupCallMemberPrefix, + + /// hack because having them both in important events and roomPreivew + /// makes the statekey '' which means you can only have one event of that + /// type + // EventTypes.GroupCallPrefix, + // EventTypes.GroupCallMemberPrefix, ]); // register all the default commands