Save ALL direct chats

This commit is contained in:
Christian Pauly 2019-06-14 12:35:53 +02:00
parent c3cd1cc6e3
commit 6d9c4d5dca

View file

@ -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)
for (int i = 0; i < value.length; i++)
txn.rawUpdate( txn.rawUpdate(
"UPDATE Rooms SET direct_chat_matrix_id=? WHERE id=?", "UPDATE Rooms SET direct_chat_matrix_id=? WHERE id=?",
[key, value[0]]); [key, value[i]]);
}); });
} }
break; break;