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.