From 510de0530434e392a281f197f77a9c49349e7fc2 Mon Sep 17 00:00:00 2001 From: Christian Pauly Date: Sat, 19 Sep 2020 15:05:43 +0200 Subject: [PATCH] fix: ignore list --- lib/src/client.dart | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/src/client.dart b/lib/src/client.dart index ff8cbaf..ebd85a6 100644 --- a/lib/src/client.dart +++ b/lib/src/client.dart @@ -1527,10 +1527,12 @@ sort order of ${prevState.sortOrder}. This should never happen...'''); } /// A list of mxids of users who are ignored. - List get ignoredUsers => - accountData.containsKey('m.ignored_user_list') - ? accountData['m.ignored_user_list'].content['ignored_users'] - : []; + List get ignoredUsers => (accountData + .containsKey('m.ignored_user_list') && + accountData['m.ignored_user_list'].content['ignored_users'] is List) + ? List.from( + accountData['m.ignored_user_list'].content['ignored_users']) + : []; /// Ignore another user. This will clear the local cached messages to /// hide all previous messages from this user.