Save ALL direct chats
This commit is contained in:
parent
c3cd1cc6e3
commit
6d9c4d5dca
|
@ -186,9 +186,10 @@ class Store {
|
||||||
final Map<String, dynamic> directMap = userUpdate.content["content"];
|
final Map<String, dynamic> directMap = userUpdate.content["content"];
|
||||||
directMap.forEach((String key, dynamic value) {
|
directMap.forEach((String key, dynamic value) {
|
||||||
if (value is List<dynamic> && value.length > 0)
|
if (value is List<dynamic> && value.length > 0)
|
||||||
txn.rawUpdate(
|
for (int i = 0; i < value.length; i++)
|
||||||
"UPDATE Rooms SET direct_chat_matrix_id=? WHERE id=?",
|
txn.rawUpdate(
|
||||||
[key, value[0]]);
|
"UPDATE Rooms SET direct_chat_matrix_id=? WHERE id=?",
|
||||||
|
[key, value[i]]);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue