Merge pull request #1835 from famedly/krille/do-not-return-invalid-state-events-from-database

fix: Do not return invalid state events from database
This commit is contained in:
rmoradi88 2024-05-29 12:15:36 +02:00 committed by GitHub
commit 25e46cb25b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 1 deletions

View File

@ -666,7 +666,8 @@ class MatrixSdkDatabase extends DatabaseApi with DatabaseFileStorage {
unimportantEvents.addAll( unimportantEvents.addAll(
states.values.map((raw) => Event.fromJson(copyMap(raw), room))); states.values.map((raw) => Event.fromJson(copyMap(raw), room)));
} }
return unimportantEvents;
return unimportantEvents.where((event) => event.stateKey != null).toList();
} }
@override @override