44 std::optional<std::string>
start;
63 std::string
roomId()
const;
71 std::optional<PaginationChunk>
messages()
const;
104 , std::string _accessToken
126 using namespace Kazv;
133 if (! jo.is_object()) { jo = json::object(); }
136 jo[
"end"s] = pod.
end;
138 jo[
"chunk"s] = pod.
chunk;
147 if (jo.contains(
"end"s)) {
148 result.
end = jo.at(
"end"s);
150 if (jo.contains(
"chunk"s)) {
151 result.
chunk = jo.at(
"chunk"s);
153 if (jo.contains(
"start"s)) {
154 result.
start = jo.at(
"start"s);
Definition: room_initial_sync.hpp:51
EventList accountData() const
The private data that this user has attached to this room.
Definition: room_initial_sync.cpp:136
std::optional< PaginationChunk > messages() const
The pagination chunk for this room.
Definition: room_initial_sync.cpp:103
EventList state() const
If the user is a member of the room this will be the current state of the room as a list of events.
Definition: room_initial_sync.cpp:114
bool success() const
Definition: room_initial_sync.cpp:70
JobResponse(Response r)
Definition: room_initial_sync.cpp:67
std::optional< std::string > visibility() const
Whether this room is visible to the /publicRooms API or not.
Definition: room_initial_sync.cpp:125
std::optional< std::string > membership() const
The user's membership state in this room.
Definition: room_initial_sync.cpp:92
std::string roomId() const
The ID of this room.
Definition: room_initial_sync.cpp:81
Snapshot the current state of a room and its most recent messages.
Definition: room_initial_sync.hpp:21
static constexpr auto needsAuth()
Definition: room_initial_sync.hpp:90
static BaseJob::Query buildQuery()
Definition: room_initial_sync.cpp:13
static BaseJob::Body buildBody(std::string roomId)
Definition: room_initial_sync.cpp:21
RoomInitialSyncJob(std::string serverUrl, std::string _accessToken, std::string roomId)
Snapshot the current state of a room and its most recent messages.
Definition: room_initial_sync.cpp:33
RoomInitialSyncJob withData(JsonWrap j) &&
Definition: room_initial_sync.cpp:53
Definition: basejob.hpp:91
Definition: basejob.hpp:77
::Kazv::Body Body
Definition: basejob.hpp:100
Definition: jsonwrap.hpp:23
Definition: location.hpp:10
Definition: location.hpp:10
void addToJsonIfNeeded(json &j, std::string name, T &&arg)
Definition: types.hpp:80
nlohmann::json json
Definition: jsonwrap.hpp:20
immer::flex_vector< Event > EventList
Definition: types.hpp:107
Definition: location.hpp:27
Definition: basejob.hpp:50