Update lib/src/Store.dart
This commit is contained in:
parent
6101a2251a
commit
cf60b50954
|
@ -184,15 +184,12 @@ class Store {
|
|||
case "m.direct":
|
||||
if (userUpdate.content["content"] is Map<String, dynamic>) {
|
||||
final Map<String, dynamic> directMap = userUpdate.content["content"];
|
||||
print("Direct Map =========> $directMap");
|
||||
directMap.forEach((String key, dynamic value) async{
|
||||
print("Handle direct Matrix ID ===========> $key");
|
||||
directMap.forEach((String key, dynamic value) {
|
||||
if (value is List<dynamic> && value.length > 0)
|
||||
for (int i = 0; i < value.length; i++) {
|
||||
final changesCount = await txn.rawUpdate(
|
||||
txn.rawUpdate(
|
||||
"UPDATE Rooms SET direct_chat_matrix_id=? WHERE id=?",
|
||||
[key, value[i]]);
|
||||
if (changesCount == 0) print("Direct chat of $key to Room ${value[i]}, was not stored");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue