aboutsummaryrefslogtreecommitdiff
path: root/room.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'room.cpp')
-rw-r--r--room.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/room.cpp b/room.cpp
index 2ba3766a..05b16b65 100644
--- a/room.cpp
+++ b/room.cpp
@@ -155,7 +155,7 @@ Room::~Room()
delete d;
}
-QString Room::id() const
+const QString& Room::id() const
{
return d->id;
}
@@ -994,14 +994,12 @@ QJsonObject Room::Private::toJson() const
QJsonObject lastReadEvent;
lastReadEvent.insert(q->readMarkerEventId(), receipt);
+ lastReadEvent.insert("x-qmatrixclient.unread_messages",
+ unreadMessages);
QJsonObject receiptsObj;
receiptsObj.insert("type", QStringLiteral("m.receipt"));
receiptsObj.insert("content", lastReadEvent);
- // In extension of the spec we add a hint to the receipt event
- // to allow setting the unread indicator without downloading
- // and analysing the timeline.
- receiptsObj.insert("x-qmatrixclient.unread_messages", unreadMessages);
ephemeralEvents.append(receiptsObj);
}