20 immer::array<std::string>
rooms;
47 if (! jo.is_object()) { jo = json::object(); }
68 if (jo.contains(
"not_rooms"s)) {
69 result.
notRooms = jo.at(
"not_rooms"s);
71 if (jo.contains(
"rooms"s)) {
72 result.
rooms = jo.at(
"rooms"s);
74 if (jo.contains(
"ephemeral"s)) {
77 if (jo.contains(
"include_leave"s)) {
80 if (jo.contains(
"state"s)) {
81 result.
state = jo.at(
"state"s);
83 if (jo.contains(
"timeline"s)) {
84 result.
timeline = jo.at(
"timeline"s);
86 if (jo.contains(
"account_data"s)) {
119 using namespace Kazv;
125 if (! jo.is_object()) { jo = json::object(); }
142 if (jo.contains(
"event_fields"s)) {
145 if (jo.contains(
"event_format"s)) {
148 if (jo.contains(
"presence"s)) {
149 result.
presence = jo.at(
"presence"s);
151 if (jo.contains(
"account_data"s)) {
154 if (jo.contains(
"room"s)) {
155 result.
room = jo.at(
"room"s);
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
Definition: location.hpp:27
Definition: event_filter.hpp:13
Definition: sync_filter.hpp:98
EventFilter presence
The presence updates to include.
Definition: sync_filter.hpp:107
immer::array< std::string > eventFields
List of event fields to include. If this list is absent then all fields are included....
Definition: sync_filter.hpp:101
RoomFilter room
Filters to be applied to room data.
Definition: sync_filter.hpp:113
EventFilter accountData
The user account data that isn't associated with rooms to include.
Definition: sync_filter.hpp:110
std::optional< std::string > eventFormat
The format to use for events. 'client' will return the events in a format suitable for clients....
Definition: sync_filter.hpp:104
Definition: room_event_filter.hpp:13
Filters to be applied to room data.
Definition: sync_filter.hpp:14
RoomEventFilter ephemeral
The events that aren't recorded in the room history, e.g. typing and receipts, to include for rooms.
Definition: sync_filter.hpp:23
immer::array< std::string > notRooms
A list of room IDs to exclude. If this list is absent then no rooms are excluded. A matching room wil...
Definition: sync_filter.hpp:17
RoomEventFilter state
The state events to include for rooms.
Definition: sync_filter.hpp:29
immer::array< std::string > rooms
A list of room IDs to include. If this list is absent then all rooms are included....
Definition: sync_filter.hpp:20
RoomEventFilter accountData
The per user account data to include for rooms.
Definition: sync_filter.hpp:35
RoomEventFilter timeline
The message and state update events to include for rooms.
Definition: sync_filter.hpp:32
std::optional< bool > includeLeave
Include rooms that the user has left in the sync, default false.
Definition: sync_filter.hpp:26
static void to_json(json &jo, const Filter &pod)
Definition: sync_filter.hpp:123
static void from_json(const json &jo, Filter &result)
Definition: sync_filter.hpp:139
static void from_json(const json &jo, RoomFilter &result)
Definition: sync_filter.hpp:65
static void to_json(json &jo, const RoomFilter &pod)
Definition: sync_filter.hpp:45