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 
188  auto localEcho(lager::reader<std::string> txnId) const -> lager::reader<LocalEchoDesc>;
189 
195  auto heroMemberEvents() const -> lager::reader<immer::flex_vector<Event>>;
196 
202  auto heroDisplayNames() const -> lager::reader<immer::flex_vector<std::string>>;
203 
212  auto nameOpt() const -> lager::reader<std::optional<std::string>>;
213 
222  auto name() const -> lager::reader<std::string>;
223 
229  auto avatarMxcUri() const -> lager::reader<std::string>;
230 
236  auto members() const -> lager::reader<immer::flex_vector<std::string>>;
237 
243  auto invitedMembers() const -> lager::reader<immer::flex_vector<std::string>>;
244 
250  auto knockedMembers() const -> lager::reader<immer::flex_vector<std::string>>;
251 
257  auto leftMembers() const -> lager::reader<immer::flex_vector<std::string>>;
258 
264  auto bannedMembers() const -> lager::reader<immer::flex_vector<std::string>>;
265 
271  auto joinedMemberEvents() const -> lager::reader<EventList>;
272 
278  auto invitedMemberEvents() const -> lager::reader<EventList>;
279 
285  auto knockedMemberEvents() const -> lager::reader<EventList>;
286 
292  auto leftMemberEvents() const -> lager::reader<EventList>;
293 
299  auto bannedMemberEvents() const -> lager::reader<EventList>;
300 
309  auto memberEventByCursor(lager::reader<std::string> userId) const -> lager::reader<Event>;
310 
319  auto memberEventFor(std::string userId) const -> lager::reader<Event>;
320 
332  lager::reader<bool> encrypted() const;
333 
334  /*lager::reader<std::string>*/
335  KAZV_WRAP_ATTR(RoomModel, roomCursor(), roomId);
336  /*lager::reader<RoomMembership>*/
337  KAZV_WRAP_ATTR(RoomModel, roomCursor(), membership);
338  /*lager::reader<std::string>*/
339  KAZV_WRAP_ATTR(RoomModel, roomCursor(), localDraft);
340  /* lager::reader<bool> */
341  KAZV_WRAP_ATTR(RoomModel, roomCursor(), membersFullyLoaded);
342 
349  auto heroIds() const -> lager::reader<immer::flex_vector<std::string>>;
350 
357  auto joinedMemberCount() const -> lager::reader<std::size_t>;
358 
365  auto invitedMemberCount() const -> lager::reader<std::size_t>;
366 
377  PromiseT setLocalDraft(std::string localDraft) const;
378 
386  PromiseT sendMessage(Event msg) const;
387 
395  PromiseT sendTextMessage(std::string text) const;
396 
404  PromiseT resendMessage(std::string txnId) const;
405 
414  PromiseT redactEvent(std::string eventId, std::optional<std::string> reason) const;
415 
423  PromiseT sendPendingKeyEvent(std::string txnId) const;
424 
432 
444  PromiseT refreshRoomState() const;
445 
458  PromiseT getStateEvent(std::string type, std::string stateKey) const;
459 
468 
476  PromiseT setName(std::string name) const;
477 
478  // lager::reader<std::string>
479  inline auto topic() const {
480  using namespace lager::lenses;
481  return stateEvents()
482  [KeyOfState{"m.room.topic", ""}]
483  [or_default]
484  .xform(eventContent
485  | jsonAtOr("topic"s, ""s));
486  }
487 
495  PromiseT setTopic(std::string topic) const;
496 
504  PromiseT invite(std::string userId) const;
505 
506  /* lager::reader<MapT<std::string, Event>> */
507  inline auto ephemeralEvents() const {
508  return roomCursor()
510  }
511 
512  /* lager::reader<std::optional<Event>> */
513  inline auto ephemeralOpt(std::string type) const {
514  return roomCursor()
516  [type];
517  }
518 
519  /* lager::reader<Event> */
520  inline auto ephemeral(std::string type) const {
521  return roomCursor()
523  [type]
524  [lager::lenses::or_default];
525  }
526 
532  auto typingUsers() const -> lager::reader<immer::flex_vector<std::string>>;
533 
539  auto typingMemberEvents() const -> lager::reader<EventList>;
540 
550  PromiseT setTyping(bool typing, std::optional<int> timeoutMs) const;
551 
552  /* lager::reader<MapT<std::string, Event>> */
553  inline auto accountDataEvents() const {
554  return roomCursor()
556  }
557 
558  /* lager::reader<std::optional<Event>> */
559  inline auto accountDataOpt(std::string type) const {
560  return roomCursor()
562  [type];
563  }
564 
565  /* lager::reader<Event> */
566  inline auto accountData(std::string type) const {
567  return roomCursor()
569  [type]
570  [lager::lenses::or_default];
571  }
572 
573  /* lager::reader<std::string> */
574  inline auto readMarker() const {
575  using namespace lager::lenses;
576  return accountData("m.fully_read")
577  .xform(eventContent
578  | jsonAtOr("event_id", std::string{}));
579  }
580 
587  PromiseT setAccountData(Event accountDataEvent) const;
588 
595  auto tags() const -> lager::reader<immer::map<std::string, double>>;
596 
606  PromiseT addOrSetTag(std::string tagId, std::optional<double> order = std::nullopt) const;
607 
616  PromiseT removeTag(std::string tagId) const;
617 
624  PromiseT leave() const;
625 
634  PromiseT forget() const;
635 
647  PromiseT kick(std::string userId, std::optional<std::string> reason = std::nullopt) const;
648 
660  PromiseT ban(std::string userId, std::optional<std::string> reason = std::nullopt) const;
661 
662  // TODO: v1.1 adds reason field
673  PromiseT unban(std::string userId/*, std::optional<std::string> reason = std::nullopt*/) const;
674 
675  /* lager::reader<JsonWrap> */
676  inline auto avatar() const {
677  return state(KeyOfState{"m.room.avatar", ""})
678  .xform(eventContent);
679  }
680 
686  auto pinnedEvents() const -> lager::reader<immer::flex_vector<std::string>>;
687 
696  PromiseT setPinnedEvents(immer::flex_vector<std::string> eventIds) const;
697 
705  PromiseT pinEvents(immer::flex_vector<std::string> eventIds) const;
706 
714  PromiseT unpinEvents(immer::flex_vector<std::string> eventIds) const;
715 
725  lager::reader<immer::map<std::string /* eventId */, std::string /* prevBatch */>> timelineGaps() const;
726 
740  PromiseT paginateBackFromEvent(std::string eventId) const;
741 
748  auto localEchoes() const -> lager::reader<immer::flex_vector<LocalEchoDesc>>;
749 
757  PromiseT removeLocalEcho(std::string txnId) const;
758 
765  auto pendingRoomKeyEvents() const -> lager::reader<immer::flex_vector<PendingRoomKeyEvent>>;
766 
772  auto powerLevels() const -> lager::reader<PowerLevelsDesc>;
773 
781  auto relatedEvents(lager::reader<std::string> eventId, std::string relType) const -> lager::reader<EventList>;
782 
789  auto eventReaders(lager::reader<std::string> eventId) const -> lager::reader<immer::flex_vector<EventReader>>;
790 
798  PromiseT postReceipt(std::string eventId) const;
799 
806  auto unreadNotificationEventIds() const -> lager::reader<immer::flex_vector<std::string>>;
807 
808  private:
809  const lager::reader<SdkModel> &sdkCursor() const;
810  const lager::reader<RoomModel> &roomCursor() const;
811  lager::reader<RoomModel> makeRoomCursor() const;
812  std::string currentRoomId() const;
814  lager::reader<immer::map<KeyOfState, Event>> inviteStateOrState() const;
816  lager::reader<Event> inviteStateOrStateEvent(lager::reader<KeyOfState> key) const;
817 
818  std::optional<lager::reader<SdkModel>> m_sdk;
819  std::variant<lager::reader<std::string>, std::string> m_roomId;
820 
821  ContextT m_ctx;
822  std::optional<DepsT> m_deps;
823  lager::reader<RoomModel> m_roomCursor;
824  KAZV_DECLARE_THREAD_ID();
825  KAZV_DECLARE_EVENT_LOOP_THREAD_ID_KEEPER(m_deps.has_value() ? &lager::get<EventLoopThreadIdKeeper &>(m_deps.value()) : 0);
826  };
827 }
Kazv::Room::refreshRoomState
PromiseT refreshRoomState() const
Get the full state of this room.
Definition: room.cpp:630
Kazv::Room::powerLevels
auto powerLevels() const -> lager::reader< PowerLevelsDesc >
Get the power levels of this room.
Definition: room.cpp:885
Kazv::Room::leave
PromiseT leave() const
Leave this room.
Definition: room.cpp:711
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:932
Kazv::Room::invitedMembers
auto invitedMembers() const -> lager::reader< immer::flex_vector< std::string >>
Get the list of invited member ids.
Definition: room.cpp:128
Kazv::Room::knockedMembers
auto knockedMembers() const -> lager::reader< immer::flex_vector< std::string >>
Get the list of knocked member ids.
Definition: room.cpp:135
Kazv::Room::setName
PromiseT setName(std::string name) const
Set the room name.
Definition: room.cpp:651
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:746
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:531
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:757
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:121
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:732
sdk-model.hpp
Kazv::Room::invitedMemberEvents
auto invitedMemberEvents() const -> lager::reader< EventList >
Get the list of invited member events.
Definition: room.cpp:163
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:281
Kazv::Room::sendTextMessage
PromiseT sendTextMessage(std::string text) const
Send a text message to this room.
Definition: room.cpp:516
Kazv::Room::accountDataEvents
auto accountDataEvents() const
Definition: room.hpp:553
Kazv::Room::pinnedEvents
auto pinnedEvents() const -> lager::reader< immer::flex_vector< std::string >>
Get pinned events of this room.
Definition: room.cpp:775
Kazv::Room::getStateEvent
PromiseT getStateEvent(std::string type, std::string stateKey) const
Get one state event with type and stateKey .
Definition: room.cpp:637
Kazv::Room::removeTag
PromiseT removeTag(std::string tagId) const
Remove a tag from this room.
Definition: room.cpp:766
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:852
Kazv::Room::pinEvents
PromiseT pinEvents(immer::flex_vector< std::string > eventIds) const
Add eventIds to the pinned events of this room.
Definition: room.cpp:795
Kazv::Room::heroDisplayNames
auto heroDisplayNames() const -> lager::reader< immer::flex_vector< std::string >>
Get the member events of heroes this room.
Definition: room.cpp:239
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:937
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:704
client-model.hpp
Kazv::Room::avatarMxcUri
auto avatarMxcUri() const -> lager::reader< std::string >
Get the avatar mxc uri of this room.
Definition: room.cpp:299
Kazv::Room::nameOpt
auto nameOpt() const -> lager::reader< std::optional< std::string >>
Get the name of this room.
Definition: room.cpp:256
Kazv::Room::timelineEvents
auto timelineEvents() const -> lager::reader< immer::flex_vector< Event >>
Get a list of timeline events in this room.
Definition: room.cpp:837
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:520
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:725
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::Room::localEcho
auto localEcho(lager::reader< std::string > txnId) const -> lager::reader< LocalEchoDesc >
Get one local echo by the txnId.
Definition: room.cpp:105
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:718
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:149
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:289
Kazv::Room::sendAllPendingKeyEvents
PromiseT sendAllPendingKeyEvents() const
Send all pending key events in this room.
Definition: room.cpp:609
Kazv::Room::heroMemberEvents
auto heroMemberEvents() const -> lager::reader< immer::flex_vector< Event >>
Get the member events of heroes this room.
Definition: room.cpp:233
Kazv::Room::invite
PromiseT invite(std::string userId) const
Invite a user to this room.
Definition: room.cpp:679
Kazv::Room::topic
auto topic() const
Definition: room.hpp:479
Kazv::Room::accountData
auto accountData(std::string type) const
Definition: room.hpp:566
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:914
Kazv::Room::joinedMemberEvents
auto joinedMemberEvents() const -> lager::reader< EventList >
Get the list of joined member events.
Definition: room.cpp:156
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:859
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:665
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:686
Kazv::Room::encrypted
lager::reader< bool > encrypted() const
Get whether this room is encrypted.
Definition: room.cpp:276
Kazv::Room::bannedMemberEvents
auto bannedMemberEvents() const -> lager::reader< EventList >
Get the list of banned member events.
Definition: room.cpp:184
Kazv::Room::inviteState
auto inviteState() const -> lager::reader< immer::map< KeyOfState, Event >>
Get the invite_state of this room.
Definition: room.cpp:228
Kazv::Room::sendStateEvent
PromiseT sendStateEvent(Event state) const
Send a state event to this room.
Definition: room.cpp:644
Kazv::Room::ephemeralEvents
auto ephemeralEvents() const
Definition: room.hpp:507
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:827
Kazv::Room::tags
auto tags() const -> lager::reader< immer::map< std::string, double >>
Get the tags of the current room.
Definition: room.cpp:752
Kazv::Room::removeLocalEcho
PromiseT removeLocalEcho(std::string txnId) const
Remove a local echo from this room.
Definition: room.cpp:872
Kazv::Room::name
auto name() const -> lager::reader< std::string >
Get the name of this room.
Definition: room.cpp:270
Kazv::Room::messagesMap
auto messagesMap() const -> lager::reader< immer::map< std::string, Event >>
Get a map from event ids to events.
Definition: room.cpp:832
Kazv::Room::sendMessage
PromiseT sendMessage(Event msg) const
Send an event to this room.
Definition: room.cpp:320
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:191
Kazv::Room::knockedMemberEvents
auto knockedMemberEvents() const -> lager::reader< EventList >
Get the list of knocked member events.
Definition: room.cpp:170
Kazv::Room::invitedMemberCount
auto invitedMemberCount() const -> lager::reader< std::size_t >
Get the invited member count of this room.
Definition: room.cpp:294
Kazv::Room::redactEvent
PromiseT redactEvent(std::string eventId, std::optional< std::string > reason) const
Redact an event.
Definition: room.cpp:571
Kazv::Room::typingMemberEvents
auto typingMemberEvents() const -> lager::reader< EventList >
Get the member events of all typing users in this room.
Definition: room.cpp:694
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:867
Kazv::Room::setPinnedEvents
PromiseT setPinnedEvents(immer::flex_vector< std::string > eventIds) const
Set pinned events of this room.
Definition: room.cpp:781
Kazv::Room::readMarker
auto readMarker() const
Definition: room.hpp:574
Kazv::Room::ephemeralOpt
auto ephemeralOpt(std::string type) const
Definition: room.hpp:513
std
Definition: clientutil.hpp:216
Kazv::Room::InEventLoopTag
Definition: room.hpp:48
Kazv::Room::accountDataOpt
auto accountDataOpt(std::string type) const
Definition: room.hpp:559
Kazv::Room
Represent a Matrix room.
Definition: room.hpp:37
Kazv::Room::avatar
auto avatar() const
Definition: room.hpp:676
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:739
Kazv::Room::setLocalDraft
PromiseT setLocalDraft(std::string localDraft) const
Set local draft for this room.
Definition: room.cpp:313
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:893
Kazv::Room::sendPendingKeyEvent
PromiseT sendPendingKeyEvent(std::string txnId) const
Send one pending key event in this room.
Definition: room.cpp:580
Kazv::Room::unpinEvents
PromiseT unpinEvents(immer::flex_vector< std::string > eventIds) const
Remove eventIds from the pinned events of this room.
Definition: room.cpp:811
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:107
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:142
Kazv::Room::leftMemberEvents
auto leftMemberEvents() const -> lager::reader< EventList >
Get the list of left member events.
Definition: room.cpp:177
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:880
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:198
Kazv::LocalEchoDesc
Describes a local echo.
Definition: local-echo.hpp:18