Save ALL direct chats

This commit is contained in:
Christian Pauly 2019-06-14 12:35:53 +02:00
parent c3cd1cc6e3
commit 6d9c4d5dca
1 changed files with 4 additions and 3 deletions

View File

@ -186,9 +186,10 @@ class Store {
final Map<String, dynamic> directMap = userUpdate.content["content"];
directMap.forEach((String key, dynamic value) {
if (value is List<dynamic> && value.length > 0)
txn.rawUpdate(
"UPDATE Rooms SET direct_chat_matrix_id=? WHERE id=?",
[key, value[0]]);
for (int i = 0; i < value.length; i++)
txn.rawUpdate(
"UPDATE Rooms SET direct_chat_matrix_id=? WHERE id=?",
[key, value[i]]);
});
}
break;