fix null check

This commit is contained in:
Jayesh Nirve 2021-08-17 05:12:17 +05:30 committed by td
parent 572402980c
commit c4c1c676da
1 changed files with 13 additions and 11 deletions

View File

@ -860,7 +860,7 @@ class FamedlySdkHiveDatabase extends DatabaseApi {
final eventsInRoomStateBox = states?.values
?.map((raw) => Event.fromJson(convertToJson(raw), room))
?.toList();
if (eventsInRoomStateBox != null) {
for (final event in eventsInRoomStateBox) {
if (event.type == 'm.room.message') {
stateMap.values.first['content']['m.relates_to'] == null
@ -873,6 +873,8 @@ class FamedlySdkHiveDatabase extends DatabaseApi {
await _roomStateBox.put(key, stateMap);
}
}
await _roomStateBox.put(key, stateMap);
}
}
}