diff options
Diffstat (limited to 'events/receiptevent.cpp')
-rw-r--r-- | events/receiptevent.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/events/receiptevent.cpp b/events/receiptevent.cpp index 3d6be9f1..646bb989 100644 --- a/events/receiptevent.cpp +++ b/events/receiptevent.cpp @@ -66,6 +66,11 @@ ReceiptEvent::ReceiptEvent(const QJsonObject& obj) } _eventsWithReceipts.push_back({eventIt.key(), receipts}); } - _unreadMessages = obj["x-qmatrixclient.unread_messages"].toBool(); + static const auto UnreadMsgsKey = + QStringLiteral("x-qmatrixclient.unread_messages"); + if (contents.contains(UnreadMsgsKey)) + _unreadMessages = contents["x-qmatrixclient.unread_messages"].toBool(); + else + _unreadMessages = obj["x-qmatrixclient.unread_messages"].toBool(); } |