aboutsummaryrefslogtreecommitdiff
path: root/lib/room.h
diff options
context:
space:
mode:
authorAlexey Rusakov <Kitsune-Ral@users.sf.net>2021-11-15 21:37:04 +0100
committerAlexey Rusakov <Kitsune-Ral@users.sf.net>2021-11-17 18:33:53 +0100
commitedb63528e6f3048045f70eb6a48412917bdbea0b (patch)
tree195815fd593e0ad0b9597c676f96f1ba9cb7d4ec /lib/room.h
parentf2bf3f203965c51824e8681427798f7a09784ce3 (diff)
downloadlibquotient-edb63528e6f3048045f70eb6a48412917bdbea0b.tar.gz
libquotient-edb63528e6f3048045f70eb6a48412917bdbea0b.zip
Bind read receipts to userIds, not to User* values
This reduces the surface interacting with the User class that eventually will be split into LocalUser (most part) and RoomMember (a tiny wrapper around the member data in a given room, used almost everywhere in Room where User currently is). Also: dropped a log message when the new receipt is at or behind the old one as it causes a lot of noise in the logs.
Diffstat (limited to 'lib/room.h')
-rw-r--r--lib/room.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/lib/room.h b/lib/room.h
index 260510e6..e4d33c4e 100644
--- a/lib/room.h
+++ b/lib/room.h
@@ -442,10 +442,18 @@ public:
//! This method is for cases when you need to show users who have read
//! an event. Calling it on inexistent or empty event id will return
//! an empty set.
- //! \sa lastReadReceipt
+ //! \note The returned list may contain ids resolving to users that are
+ //! not loaded as room members yet (in particular, if members are not
+ //! yet lazy-loaded). For now this merely means that the user's
+ //! room-specific name and avatar will not be there; but generally
+ //! it's recommended to ensure that all room members are loaded
+ //! before operating on the result of this function.
+ //! \sa lastReadReceipt, allMembersLoaded
+ QSet<QString> userIdsAtEvent(const QString& eventId);
+
+ [[deprecated("Use userIdsAtEvent instead")]]
QSet<User*> usersAtEventId(const QString& eventId);
- //!
//! \brief Mark the event with uptoEventId as fully read
//!
//! Marks the event with the specified id as fully read locally and also