Merge branch 'connection-fix-null-check' into 'master'

[Connection] Fix wrong null check

See merge request famedly/famedlysdk!105
This commit is contained in:
Christian Pauly 2019-10-23 10:31:26 +00:00
commit 5f2d7c06d9

View file

@ -465,7 +465,7 @@ class Connection {
if (userTimestampMap[mxid]["ts"] is int) { if (userTimestampMap[mxid]["ts"] is int) {
if (receiptStateContent[eventID] == null) if (receiptStateContent[eventID] == null)
receiptStateContent[eventID] = {"m.read": {}}; receiptStateContent[eventID] = {"m.read": {}};
else if (receiptStateContent[eventID]["m.read"]) else if (receiptStateContent[eventID]["m.read"] == null)
receiptStateContent[eventID]["m.read"] = {}; receiptStateContent[eventID]["m.read"] = {};
receiptStateContent[eventID]["m.read"][mxid] = { receiptStateContent[eventID]["m.read"][mxid] = {
"ts": userTimestampMap[mxid]["ts"], "ts": userTimestampMap[mxid]["ts"],