Merge branch 'connection-fix-add-type-check' into 'master'

[Connection] Add type check

See merge request famedly/famedlysdk!114
This commit is contained in:
Christian Pauly 2019-11-07 09:03:05 +00:00
commit d43bd6a065

View file

@ -461,7 +461,8 @@ class Connection {
break; break;
} }
} }
if (userTimestampMap[mxid].containsKey("ts")) { if (userTimestampMap[mxid] is Map<String, dynamic> &&
userTimestampMap[mxid].containsKey("ts")) {
receiptStateContent[mxid] = { receiptStateContent[mxid] = {
"event_id": eventID, "event_id": eventID,
"ts": userTimestampMap[mxid]["ts"], "ts": userTimestampMap[mxid]["ts"],