Changeset View
Changeset View
Standalone View
Standalone View
src/client/room/room.hpp
| Show First 20 Lines • Show All 755 Lines • ▼ Show 20 Lines | #endif | ||||
| /** | /** | ||||
| * Get a list of read receipts of some event in this room. | * Get a list of read receipts of some event in this room. | ||||
| * | * | ||||
| * @param eventId The id of the event. | * @param eventId The id of the event. | ||||
| * @return A lager::reader of a RangeT of matrix id and timestamp of receipts of the event. | * @return A lager::reader of a RangeT of matrix id and timestamp of receipts of the event. | ||||
| */ | */ | ||||
| auto eventReaders(lager::reader<std::string> eventId) const -> lager::reader<immer::flex_vector<EventReader>>; | auto eventReaders(lager::reader<std::string> eventId) const -> lager::reader<immer::flex_vector<EventReader>>; | ||||
| /** | |||||
| * Post a read receipt for this room. | |||||
| * | |||||
| * @param eventId The event id the user has read up to. | |||||
| * | |||||
| * @return A Promise that resolves when the read receipt is sent. | |||||
| */ | |||||
| PromiseT postReceipt(std::string eventId) const; | |||||
| private: | private: | ||||
| const lager::reader<SdkModel> &sdkCursor() const; | const lager::reader<SdkModel> &sdkCursor() const; | ||||
| const lager::reader<RoomModel> &roomCursor() const; | const lager::reader<RoomModel> &roomCursor() const; | ||||
| lager::reader<RoomModel> makeRoomCursor() const; | lager::reader<RoomModel> makeRoomCursor() const; | ||||
| std::string currentRoomId() const; | std::string currentRoomId() const; | ||||
| /// if membership is invite, return inviteState; otherwise return stateEvents | /// if membership is invite, return inviteState; otherwise return stateEvents | ||||
| lager::reader<immer::map<KeyOfState, Event>> inviteStateOrState() const; | lager::reader<immer::map<KeyOfState, Event>> inviteStateOrState() const; | ||||
| /// if membership is invite and inviteState[key] exists, return inviteState[key], otherwise return stateEvents[key] | /// if membership is invite and inviteState[key] exists, return inviteState[key], otherwise return stateEvents[key] | ||||
| Show All 12 Lines | |||||