[Connection] Fix wrong null check

This commit is contained in:
Christian Pauly 2019-10-23 10:31:26 +00:00
parent 6c2251ed7a
commit c618fd57b1

View file

@ -465,7 +465,7 @@ class Connection {
if (userTimestampMap[mxid]["ts"] is int) {
if (receiptStateContent[eventID] == null)
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"][mxid] = {
"ts": userTimestampMap[mxid]["ts"],