Add logs for UserUpdates

This commit is contained in:
Christian 2019-06-12 07:22:47 +00:00
parent 7ec2cca470
commit 9ef4e4af41

View file

@ -177,11 +177,13 @@ class Store {
/// Stores an UserUpdate object in the database. Must be called inside of /// Stores an UserUpdate object in the database. Must be called inside of
/// [transaction]. /// [transaction].
Future<void> storeUserEventUpdate(UserUpdate userUpdate) { Future<void> storeUserEventUpdate(UserUpdate userUpdate) {
print("New userUpdate");
dynamic eventContent = userUpdate.content; dynamic eventContent = userUpdate.content;
String type = userUpdate.type; String type = userUpdate.type;
switch (userUpdate.eventType) { switch (userUpdate.eventType) {
case "m.direct": case "m.direct":
print("New direct update: ${userUpdate.content}");
if (userUpdate.content["content"] is Map<String, List<String>>) { if (userUpdate.content["content"] is Map<String, List<String>>) {
Map<String, List<String>> directMap = userUpdate.content["content"]; Map<String, List<String>> directMap = userUpdate.content["content"];
directMap.forEach((String key, List<String> value) { directMap.forEach((String key, List<String> value) {