aboutsummaryrefslogtreecommitdiff
path: root/lib/room.cpp
diff options
context:
space:
mode:
authorAlexey Rusakov <Kitsune-Ral@users.sf.net>2021-11-08 21:03:37 +0100
committerAlexey Rusakov <Kitsune-Ral@users.sf.net>2021-11-17 18:33:56 +0100
commitb472fc355dc5ce70391ca2b9bc8da35b973ae3a3 (patch)
tree797c7ebbea775f1fe79f211c10752d849a68fe50 /lib/room.cpp
parent7b633ba257fc8643ef8cc2ef724f3b6ac9e186ba (diff)
downloadlibquotient-b472fc355dc5ce70391ca2b9bc8da35b973ae3a3.tar.gz
libquotient-b472fc355dc5ce70391ca2b9bc8da35b973ae3a3.zip
Room: lastLocalReadReceipt(), localReadReceiptMarker()
To simplify retrieval of the local m.read receipt and the marker for it.
Diffstat (limited to 'lib/room.cpp')
-rw-r--r--lib/room.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/room.cpp b/lib/room.cpp
index ee76a85c..273a5753 100644
--- a/lib/room.cpp
+++ b/lib/room.cpp
@@ -1014,6 +1014,16 @@ ReadReceipt Room::lastReadReceipt(const QString& userId) const
return d->lastReadReceipts.value(userId);
}
+ReadReceipt Room::lastLocalReadReceipt() const
+{
+ return d->lastReadReceipts.value(localUser()->id());
+}
+
+Room::rev_iter_t Room::localReadReceiptMarker() const
+{
+ return findInTimeline(lastLocalReadReceipt().eventId);
+}
+
QString Room::lastFullyReadEventId() const { return d->fullyReadUntilEventId; }
Room::rev_iter_t Room::fullyReadMarker() const