libkazv
room.hpp
Go to the documentation of this file.
1 /*
2  * This file is part of libkazv.
3  * SPDX-FileCopyrightText: 2020-2023 tusooa <tusooa@kazv.moe>
4  * SPDX-License-Identifier: AGPL-3.0-or-later
5  */
6 
7 #pragma once
8 #include <libkazv-config.hpp>
9 
10 #include <lager/reader.hpp>
11 #include <lager/context.hpp>
12 #include <lager/with.hpp>
13 #include <lager/constant.hpp>
14 #include <lager/lenses/optional.hpp>
15 #include <zug/transducer/map.hpp>
16 #include <zug/transducer/filter.hpp>
17 #include <zug/sequence.hpp>
18 #include <immer/flex_vector_transient.hpp>
19 
20 #include "debug.hpp"
21 
22 #include "sdk-model.hpp"
23 #include "client-model.hpp"
24 #include "room-model.hpp"
25 #include <cursorutil.hpp>
26 #include "sdk-model-cursor-tag.hpp"
27 #include "random-generator.hpp"
28 #include "power-levels-desc.hpp"
29 
30 namespace Kazv
31 {
37  class Room
38  {
39  public:
41  using DepsT = lager::deps<SdkModelCursorKey, RandomInterface &
42 #ifdef KAZV_USE_THREAD_SAFETY_HELPER
43  , EventLoopThreadIdKeeper &
44 #endif
45  >;
47 
48  struct InEventLoopTag {};
49 
62  Room(lager::reader<SdkModel> sdk,
63  lager::reader<std::string> roomId,
64  ContextT ctx);
65 
78  Room(lager::reader<SdkModel> sdk,
79  lager::reader<std::string> roomId,
80  ContextT ctx, DepsT deps);
81 
94  Room(InEventLoopTag, std::string roomId, ContextT ctx, DepsT deps);
95 
120  Room toEventLoop() const;
121 
122  /* lager::reader<MapT<KeyOfState, Event>> */
123  inline auto stateEvents() const {
124  return roomCursor()
126  }
127 
133  auto inviteState() const -> lager::reader<immer::map<KeyOfState, Event>>;
134 
135  /* lager::reader<std::optional<Event>> */
136  inline auto stateOpt(KeyOfState k) const {
137  return stateEvents()
138  [std::move(k)];
139  }
140 
141  /* lager::reader<Event> */
142  inline auto state(KeyOfState k) const {
143  return stateOpt(k)
144  [lager::lenses::or_default];
145  }
146 
153  auto timelineEventIds() const -> lager::reader<immer::flex_vector<std::string>>;
154 
161  auto messagesMap() const -> lager::reader<immer::map<std::string, Event>>;
162 
170  auto timelineEvents() const -> lager::reader<immer::flex_vector<Event>>;
171 
179  auto message(lager::reader<std::string> eventId) const -> lager::reader<Event>;
180 
186  auto heroMemberEvents() const -> lager::reader<immer::flex_vector<Event>>;
187 
193  auto heroDisplayNames() const -> lager::reader<immer::flex_vector<std::string>>;
194 
203  auto nameOpt() const -> lager::reader<std::optional<std::string>>;
204 
213  auto name() const -> lager::reader<std::string>;
214 
220  auto avatarMxcUri() const -> lager::reader<std::string>;
221 
227  auto members() const -> lager::reader<immer::flex_vector<std::string>>;
228 
234  auto invitedMembers() const -> lager::reader<immer::flex_vector<std::string>>;
235 
241  auto knockedMembers() const -> lager::reader<immer::flex_vector<std::string>>;
242 
248  auto leftMembers() const -> lager::reader<immer::flex_vector<std::string>>;
249 
255  auto bannedMembers() const -> lager::reader<immer::flex_vector<std::string>>;
256 
262  auto joinedMemberEvents() const -> lager::reader<EventList>;
263 
269  auto invitedMemberEvents() const -> lager::reader<EventList>;
270 
276  auto knockedMemberEvents() const -> lager::reader<EventList>;
277 
283  auto leftMemberEvents() const -> lager::reader<EventList>;
284 
290  auto bannedMemberEvents() const -> lager::reader<EventList>;
291 
300  auto memberEventByCursor(lager::reader<std::string> userId) const -> lager::reader<Event>;
301 
310  auto memberEventFor(std::string userId) const -> lager::reader<Event>;
311 
323  lager::reader<bool> encrypted() const;
324 
325  /*lager::reader<std::string>*/
326  KAZV_WRAP_ATTR(RoomModel, roomCursor(), roomId);
327  /*lager::reader<RoomMembership>*/
328  KAZV_WRAP_ATTR(RoomModel, roomCursor(), membership);
329  /*lager::reader<std::string>*/
330  KAZV_WRAP_ATTR(RoomModel, roomCursor(), localDraft);
331  /* lager::reader<bool> */
332  KAZV_WRAP_ATTR(RoomModel, roomCursor(), membersFullyLoaded);
333 
340  auto heroIds() const -> lager::reader<immer::flex_vector<std::string>>;
341 
348  auto joinedMemberCount() const -> lager::reader<std::size_t>;
349 
356  auto invitedMemberCount() const -> lager::reader<std::size_t>;
357 
368  PromiseT setLocalDraft(std::string localDraft) const;
369 
377  PromiseT sendMessage(Event msg) const;
378 
386  PromiseT sendTextMessage(std::string text) const;
387 
395  PromiseT resendMessage(std::string txnId) const;
396 
405  PromiseT redactEvent(std::string eventId, std::optional<std::string> reason) const;
406 
414  PromiseT sendPendingKeyEvent(std::string txnId) const;
415 
423 
435  PromiseT refreshRoomState() const;
436 
449  PromiseT getStateEvent(std::string type, std::string stateKey) const;
450 
459 
467  PromiseT setName(std::string name) const;
468 
469  // lager::reader<std::string>
470  inline auto topic() const {
471  using namespace lager::lenses;
472  return stateEvents()
473  [KeyOfState{"m.room.topic", ""}]
474  [or_default]
475  .xform(eventContent
476  | jsonAtOr("topic"s, ""s));
477  }
478 
486  PromiseT setTopic(std::string topic) const;
487 
495  PromiseT invite(std::string userId) const;
496 
497  /* lager::reader<MapT<std::string, Event>> */
498  inline auto ephemeralEvents() const {
499  return roomCursor()
501  }
502 
503  /* lager::reader<std::optional<Event>> */
504  inline auto ephemeralOpt(std::string type) const {
505  return roomCursor()
507  [type];
508  }
509 
510  /* lager::reader<Event> */
511  inline auto ephemeral(std::string type) const {
512  return roomCursor()
514  [type]
515  [lager::lenses::or_default];
516  }
517 
523  auto typingUsers() const -> lager::reader<immer::flex_vector<std::string>>;
524 
530  auto typingMemberEvents() const -> lager::reader<EventList>;
531 
541  PromiseT setTyping(bool typing, std::optional<int> timeoutMs) const;
542 
543  /* lager::reader<MapT<std::string, Event>> */
544  inline auto accountDataEvents() const {
545  return roomCursor()
547  }
548 
549  /* lager::reader<std::optional<Event>> */
550  inline auto accountDataOpt(std::string type) const {
551  return roomCursor()
553  [type];
554  }
555 
556  /* lager::reader<Event> */
557  inline auto accountData(std::string type) const {
558  return roomCursor()
560  [type]
561  [lager::lenses::or_default];
562  }
563 
564  /* lager::reader<std::string> */
565  inline auto readMarker() const {
566  using namespace lager::lenses;
567  return accountData("m.fully_read")
568  .xform(eventContent
569  | jsonAtOr("event_id", std::string{}));
570  }
571 
578  PromiseT setAccountData(Event accountDataEvent) const;
579 
586  auto tags() const -> lager::reader<immer::map<std::string, double>>;
587 
597  PromiseT addOrSetTag(std::string tagId, std::optional<double> order = std::nullopt) const;
598 
607  PromiseT removeTag(std::string tagId) const;
608 
615  PromiseT leave() const;
616 
625  PromiseT forget() const;
626 
638  PromiseT kick(std::string userId, std::optional<std::string> reason = std::nullopt) const;
639 
651  PromiseT ban(std::string userId, std::optional<std::string> reason = std::nullopt) const;
652 
653  // TODO: v1.1 adds reason field
664  PromiseT unban(std::string userId/*, std::optional<std::string> reason = std::nullopt*/) const;
665 
666  /* lager::reader<JsonWrap> */
667  inline auto avatar() const {
668  return state(KeyOfState{"m.room.avatar", ""})
669  .xform(eventContent);
670  }
671 
677  auto pinnedEvents() const -> lager::reader<immer::flex_vector<std::string>>;
678 
687  PromiseT setPinnedEvents(immer::flex_vector<std::string> eventIds) const;
688 
696  PromiseT pinEvents(immer::flex_vector<std::string> eventIds) const;
697 
705  PromiseT unpinEvents(immer::flex_vector<std::string> eventIds) const;
706 
716  lager::reader<immer::map<std::string /* eventId */, std::string /* prevBatch */>> timelineGaps() const;
717 
731  PromiseT paginateBackFromEvent(std::string eventId) const;
732 
739  auto localEchoes() const -> lager::reader<immer::flex_vector<LocalEchoDesc>>;
740 
748  PromiseT removeLocalEcho(std::string txnId) const;
749 
756  auto pendingRoomKeyEvents() const -> lager::reader<immer::flex_vector<PendingRoomKeyEvent>>;
757 
763  auto powerLevels() const -> lager::reader<PowerLevelsDesc>;
764 
772  auto relatedEvents(lager::reader<std::string> eventId, std::string relType) const -> lager::reader<EventList>;
773 
780  auto eventReaders(lager::reader<std::string> eventId) const -> lager::reader<immer::flex_vector<EventReader>>;
781 
789  PromiseT postReceipt(std::string eventId) const;
790 
797  auto unreadNotificationEventIds() const -> lager::reader<immer::flex_vector<std::string>>;
798 
799  private:
800  const lager::reader<SdkModel> &sdkCursor() const;
801  const lager::reader<RoomModel> &roomCursor() const;
802  lager::reader<RoomModel> makeRoomCursor() const;
803  std::string currentRoomId() const;
805  lager::reader<immer::map<KeyOfState, Event>> inviteStateOrState() const;
807  lager::reader<Event> inviteStateOrStateEvent(lager::reader<KeyOfState> key) const;
808 
809  std::optional<lager::reader<SdkModel>> m_sdk;
810  std::variant<lager::reader<std::string>, std::string> m_roomId;
811 
812  ContextT m_ctx;
813  std::optional<DepsT> m_deps;
814  lager::reader<RoomModel> m_roomCursor;
815  KAZV_DECLARE_THREAD_ID();
816  KAZV_DECLARE_EVENT_LOOP_THREAD_ID_KEEPER(m_deps.has_value() ? &lager::get<EventLoopThreadIdKeeper &>(m_deps.value()) : 0);
817  };
818 }
Kazv::Room::refreshRoomState
PromiseT refreshRoomState() const
Get the full state of this room.
Definition: room.cpp:614
Kazv::Room::powerLevels
auto powerLevels() const -> lager::reader< PowerLevelsDesc >
Get the power levels of this room.
Definition: room.cpp:869
Kazv::Room::leave
PromiseT leave() const
Leave this room.
Definition: room.cpp:695
room-model.hpp
Kazv::PowerLevelsDesc
Represent a m.power_levels event.
Definition: power-levels-desc.hpp:25
Kazv::Room::postReceipt
PromiseT postReceipt(std::string eventId) const
Post a read receipt for this room.
Definition: room.cpp:916
Kazv::Room::invitedMembers
auto invitedMembers() const -> lager::reader< immer::flex_vector< std::string >>
Get the list of invited member ids.
Definition: room.cpp:112
Kazv::Room::knockedMembers
auto knockedMembers() const -> lager::reader< immer::flex_vector< std::string >>
Get the list of knocked member ids.
Definition: room.cpp:119
Kazv::Room::setName
PromiseT setName(std::string name) const
Set the room name.
Definition: room.cpp:635
Kazv::RoomModel::stateEvents
immer::map< KeyOfState, Event > stateEvents
Definition: room-model.hpp:217
Kazv::Room::Room
Room(lager::reader< SdkModel > sdk, lager::reader< std::string > roomId, ContextT ctx)
Constructor.
Kazv::Room::setAccountData
PromiseT setAccountData(Event accountDataEvent) const
Set the account data for this room.
Definition: room.cpp:730
Kazv::PendingRoomKeyEvent
Definition: room-model.hpp:31
Kazv::Room::resendMessage
PromiseT resendMessage(std::string txnId) const
Resend an event to this room.
Definition: room.cpp:515
Kazv::Room::addOrSetTag
PromiseT addOrSetTag(std::string tagId, std::optional< double > order=std::nullopt) const
Add or set a tag to this room.
Definition: room.cpp:741
random-generator.hpp
Kazv::ContextBase
Definition: context.hpp:129
Kazv::Room::members
auto members() const -> lager::reader< immer::flex_vector< std::string >>
Get the list of joined member ids.
Definition: room.cpp:105
Kazv::Room::ban
PromiseT ban(std::string userId, std::optional< std::string > reason=std::nullopt) const
Ban a user from this room.
Definition: room.cpp:716
sdk-model.hpp
Kazv::Room::invitedMemberEvents
auto invitedMemberEvents() const -> lager::reader< EventList >
Get the list of invited member events.
Definition: room.cpp:147
Kazv::Room::heroIds
auto heroIds() const -> lager::reader< immer::flex_vector< std::string >>
Get the ids of the heroes of the room.
Definition: room.cpp:265
Kazv::Room::sendTextMessage
PromiseT sendTextMessage(std::string text) const
Send a text message to this room.
Definition: room.cpp:500
Kazv::Room::accountDataEvents
auto accountDataEvents() const
Definition: room.hpp:544
Kazv::Room::pinnedEvents
auto pinnedEvents() const -> lager::reader< immer::flex_vector< std::string >>
Get pinned events of this room.
Definition: room.cpp:759
Kazv::Room::getStateEvent
PromiseT getStateEvent(std::string type, std::string stateKey) const
Get one state event with type and stateKey .
Definition: room.cpp:621
Kazv::Room::removeTag
PromiseT removeTag(std::string tagId) const
Remove a tag from this room.
Definition: room.cpp:750
Kazv::Room::timelineGaps
lager::reader< immer::map< std::string, std::string > > timelineGaps() const
Get the Gaps in the timeline for this room.
Definition: room.cpp:836
Kazv::Room::pinEvents
PromiseT pinEvents(immer::flex_vector< std::string > eventIds) const
Add eventIds to the pinned events of this room.
Definition: room.cpp:779
Kazv::Room::heroDisplayNames
auto heroDisplayNames() const -> lager::reader< immer::flex_vector< std::string >>
Get the member events of heroes this room.
Definition: room.cpp:223
Kazv::Room::KAZV_WRAP_ATTR
KAZV_WRAP_ATTR(RoomModel, roomCursor(), roomId)
Kazv::Room::unreadNotificationEventIds
auto unreadNotificationEventIds() const -> lager::reader< immer::flex_vector< std::string >>
Get a list of event ids of unread notifications.
Definition: room.cpp:921
Kazv
Definition: location.hpp:10
Kazv::SdkModelCursorKey
lager::dep::key< SdkModelCursorTag, lager::dep::fn< std::shared_ptr< lager::reader< SdkModel > >> > SdkModelCursorKey
Definition: sdk-model-cursor-tag.hpp:23
Kazv::Room::setTyping
PromiseT setTyping(bool typing, std::optional< int > timeoutMs) const
Set the typing status of the current user in this room.
Definition: room.cpp:688
client-model.hpp
Kazv::Room::avatarMxcUri
auto avatarMxcUri() const -> lager::reader< std::string >
Get the avatar mxc uri of this room.
Definition: room.cpp:283
Kazv::Room::nameOpt
auto nameOpt() const -> lager::reader< std::optional< std::string >>
Get the name of this room.
Definition: room.cpp:240
Kazv::Room::timelineEvents
auto timelineEvents() const -> lager::reader< immer::flex_vector< Event >>
Get a list of timeline events in this room.
Definition: room.cpp:821
Kazv::Room::PromiseT
SingleTypePromise< DefaultRetType > PromiseT
Definition: room.hpp:40
Kazv::Room::state
auto state(KeyOfState k) const
Definition: room.hpp:142
Kazv::Room::ephemeral
auto ephemeral(std::string type) const
Definition: room.hpp:511
sdk-model-cursor-tag.hpp
Kazv::RandomInterface
Definition: random-generator.hpp:15
Kazv::jsonAtOr
constexpr auto jsonAtOr(T &&key, V &&defaultValue)
Definition: cursorutil.hpp:140
Kazv::Room::kick
PromiseT kick(std::string userId, std::optional< std::string > reason=std::nullopt) const
Kick a user from this room.
Definition: room.cpp:709
Kazv::Room::toEventLoop
Room toEventLoop() const
Return a Room that represents the room currently represented by this, but suitable for use in the eve...
Definition: room.cpp:52
Kazv::RoomModel
Definition: room-model.hpp:209
Kazv::RoomModel::ephemeral
immer::map< std::string, Event > ephemeral
Definition: room-model.hpp:231
Kazv::EventReader
Definition: room-model.hpp:54
Kazv::Room::forget
PromiseT forget() const
Forget this room.
Definition: room.cpp:702
cursorutil.hpp
Kazv::Room::bannedMembers
auto bannedMembers() const -> lager::reader< immer::flex_vector< std::string >>
Get the list of banned member ids.
Definition: room.cpp:133
Kazv::Room::stateEvents
auto stateEvents() const
Definition: room.hpp:123
Kazv::Room::joinedMemberCount
auto joinedMemberCount() const -> lager::reader< std::size_t >
Get the joined member count of this room.
Definition: room.cpp:273
Kazv::Room::sendAllPendingKeyEvents
PromiseT sendAllPendingKeyEvents() const
Send all pending key events in this room.
Definition: room.cpp:593
Kazv::Room::heroMemberEvents
auto heroMemberEvents() const -> lager::reader< immer::flex_vector< Event >>
Get the member events of heroes this room.
Definition: room.cpp:217
Kazv::Room::invite
PromiseT invite(std::string userId) const
Invite a user to this room.
Definition: room.cpp:663
Kazv::Room::topic
auto topic() const
Definition: room.hpp:470
Kazv::Room::accountData
auto accountData(std::string type) const
Definition: room.hpp:557
Kazv::Room::eventReaders
auto eventReaders(lager::reader< std::string > eventId) const -> lager::reader< immer::flex_vector< EventReader >>
Get a list of read receipts of some event in this room.
Definition: room.cpp:898
Kazv::Room::joinedMemberEvents
auto joinedMemberEvents() const -> lager::reader< EventList >
Get the list of joined member events.
Definition: room.cpp:140
Kazv::eventContent
constexpr auto eventContent
Definition: cursorutil.hpp:128
Kazv::Room::paginateBackFromEvent
PromiseT paginateBackFromEvent(std::string eventId) const
Try to paginate back from eventId.
Definition: room.cpp:843
Kazv::Room::message
auto message(lager::reader< std::string > eventId) const -> lager::reader< Event >
Get one message by the event id.
Definition: room.cpp:97
Kazv::Room::setTopic
PromiseT setTopic(std::string topic) const
Set the room topic.
Definition: room.cpp:649
Kazv::Room::typingUsers
auto typingUsers() const -> lager::reader< immer::flex_vector< std::string >>
Get the ids of all typing users in this room.
Definition: room.cpp:670
Kazv::Room::encrypted
lager::reader< bool > encrypted() const
Get whether this room is encrypted.
Definition: room.cpp:260
Kazv::Room::bannedMemberEvents
auto bannedMemberEvents() const -> lager::reader< EventList >
Get the list of banned member events.
Definition: room.cpp:168
Kazv::Room::inviteState
auto inviteState() const -> lager::reader< immer::map< KeyOfState, Event >>
Get the invite_state of this room.
Definition: room.cpp:212
Kazv::Room::sendStateEvent
PromiseT sendStateEvent(Event state) const
Send a state event to this room.
Definition: room.cpp:628
Kazv::Room::ephemeralEvents
auto ephemeralEvents() const
Definition: room.hpp:498
debug.hpp
Kazv::Room::timelineEventIds
auto timelineEventIds() const -> lager::reader< immer::flex_vector< std::string >>
Get the timeline event ids of this room in ascending timestamp order.
Definition: room.cpp:811
Kazv::Room::tags
auto tags() const -> lager::reader< immer::map< std::string, double >>
Get the tags of the current room.
Definition: room.cpp:736
Kazv::Room::removeLocalEcho
PromiseT removeLocalEcho(std::string txnId) const
Remove a local echo from this room.
Definition: room.cpp:856
Kazv::Room::name
auto name() const -> lager::reader< std::string >
Get the name of this room.
Definition: room.cpp:254
Kazv::Room::messagesMap
auto messagesMap() const -> lager::reader< immer::map< std::string, Event >>
Get a map from event ids to events.
Definition: room.cpp:816
Kazv::Room::sendMessage
PromiseT sendMessage(Event msg) const
Send an event to this room.
Definition: room.cpp:304
Kazv::Room::DepsT
lager::deps< SdkModelCursorKey, RandomInterface & > DepsT
Definition: room.hpp:45
Kazv::Room::memberEventByCursor
auto memberEventByCursor(lager::reader< std::string > userId) const -> lager::reader< Event >
Get the member event for userId.
Definition: room.cpp:175
Kazv::Room::knockedMemberEvents
auto knockedMemberEvents() const -> lager::reader< EventList >
Get the list of knocked member events.
Definition: room.cpp:154
Kazv::Room::invitedMemberCount
auto invitedMemberCount() const -> lager::reader< std::size_t >
Get the invited member count of this room.
Definition: room.cpp:278
Kazv::Room::redactEvent
PromiseT redactEvent(std::string eventId, std::optional< std::string > reason) const
Redact an event.
Definition: room.cpp:555
Kazv::Room::typingMemberEvents
auto typingMemberEvents() const -> lager::reader< EventList >
Get the member events of all typing users in this room.
Definition: room.cpp:678
Kazv::Event
Definition: event.hpp:20
Kazv::Room::localEchoes
auto localEchoes() const -> lager::reader< immer::flex_vector< LocalEchoDesc >>
Get the list of local echoes in this room.
Definition: room.cpp:851
Kazv::Room::setPinnedEvents
PromiseT setPinnedEvents(immer::flex_vector< std::string > eventIds) const
Set pinned events of this room.
Definition: room.cpp:765
Kazv::Room::readMarker
auto readMarker() const
Definition: room.hpp:565
Kazv::Room::ephemeralOpt
auto ephemeralOpt(std::string type) const
Definition: room.hpp:504
std
Definition: clientutil.hpp:216
Kazv::Room::InEventLoopTag
Definition: room.hpp:48
Kazv::Room::accountDataOpt
auto accountDataOpt(std::string type) const
Definition: room.hpp:550
Kazv::Room
Represent a Matrix room.
Definition: room.hpp:37
Kazv::Room::avatar
auto avatar() const
Definition: room.hpp:667
Kazv::SingleTypePromise
Definition: promise-interface.hpp:121
Kazv::Room::unban
PromiseT unban(std::string userId) const
Unban a user from this room.
Definition: room.cpp:723
Kazv::Room::setLocalDraft
PromiseT setLocalDraft(std::string localDraft) const
Set local draft for this room.
Definition: room.cpp:297
Kazv::Room::relatedEvents
auto relatedEvents(lager::reader< std::string > eventId, std::string relType) const -> lager::reader< EventList >
Get a list of child events of a specified event.
Definition: room.cpp:877
Kazv::Room::sendPendingKeyEvent
PromiseT sendPendingKeyEvent(std::string txnId) const
Send one pending key event in this room.
Definition: room.cpp:564
Kazv::Room::unpinEvents
PromiseT unpinEvents(immer::flex_vector< std::string > eventIds) const
Remove eventIds from the pinned events of this room.
Definition: room.cpp:795
libkazv-config.hpp
Kazv::Room::ContextT
Context< ClientAction > ContextT
Definition: room.hpp:46
Kazv::RoomModel::accountData
immer::map< std::string, Event > accountData
Definition: room-model.hpp:223
Kazv::Room::stateOpt
auto stateOpt(KeyOfState k) const
Definition: room.hpp:136
Kazv::EventList
immer::flex_vector< Event > EventList
Definition: types.hpp:96
Kazv::KeyOfState
Definition: clientutil.hpp:56
Kazv::Room::leftMembers
auto leftMembers() const -> lager::reader< immer::flex_vector< std::string >>
Get the list of left member ids.
Definition: room.cpp:126
Kazv::Room::leftMemberEvents
auto leftMemberEvents() const -> lager::reader< EventList >
Get the list of left member events.
Definition: room.cpp:161
Kazv::SdkModel
Definition: sdk-model.hpp:25
Kazv::Room::pendingRoomKeyEvents
auto pendingRoomKeyEvents() const -> lager::reader< immer::flex_vector< PendingRoomKeyEvent >>
Get the list of pending room key events in this room.
Definition: room.cpp:864
power-levels-desc.hpp
Kazv::Room::memberEventFor
auto memberEventFor(std::string userId) const -> lager::reader< Event >
Get the member event for userId.
Definition: room.cpp:182
Kazv::LocalEchoDesc
Describes a local echo.
Definition: local-echo.hpp:18