16     std::optional<std::int_fast64_t> 
age;
 
   41   if (! jo.is_object()) { jo = json::object(); }
 
   56     if (jo.contains(
"age"s)) {
 
   57       result.
age = jo.at(
"age"s);
 
   59     if (jo.contains(
"redacted_because"s)) {
 
   62     if (jo.contains(
"transaction_id"s)) {
 
   65     if (jo.contains(
"prev_content"s)) {
 
  113 using namespace Kazv;
 
  119   if (! jo.is_object()) { jo = json::object(); }
 
  124     jo[
"type"s] = pod.
type;
 
  126     jo[
"sender"s] = pod.
sender;
 
  140     if (jo.contains(
"event_id"s)) {
 
  141       result.
eventId = jo.at(
"event_id"s);
 
  143     if (jo.contains(
"type"s)) {
 
  144       result.
type = jo.at(
"type"s);
 
  146     if (jo.contains(
"sender"s)) {
 
  147       result.
sender = jo.at(
"sender"s);
 
  149     if (jo.contains(
"origin_server_ts"s)) {
 
  152     if (jo.contains(
"content"s)) {
 
  153       result.
content = jo.at(
"content"s);
 
  155     if (jo.contains(
"state_key"s)) {
 
  156       result.
stateKey = jo.at(
"state_key"s);
 
  158     if (jo.contains(
"unsigned"s)) {
 
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
 
Definition: location.hpp:27
 
The format used for events when they are returned from API endpoints such as /sync,...
Definition: client_event_without_room_id.hpp:79
 
std::string type
The type of the event.
Definition: client_event_without_room_id.hpp:85
 
std::optional< UnsignedData > unsignedData
Contains optional extra information about the event.
Definition: client_event_without_room_id.hpp:107
 
std::int_fast64_t originServerTs
Timestamp (in milliseconds since the unix epoch) on originating homeserver when this event was sent.
Definition: client_event_without_room_id.hpp:92
 
std::string eventId
The globally unique identifier for this event.
Definition: client_event_without_room_id.hpp:82
 
std::string sender
Contains the fully-qualified ID of the user who sent this event.
Definition: client_event_without_room_id.hpp:88
 
std::optional< std::string > stateKey
Present if, and only if, this event is a state event.
Definition: client_event_without_room_id.hpp:104
 
JsonWrap content
The body of this event, as created by the client which sent it.
Definition: client_event_without_room_id.hpp:95
 
Contains optional extra information about the event.
Definition: client_event_without_room_id.hpp:13
 
std::optional< std::int_fast64_t > age
The time in milliseconds that has elapsed since the event was sent. This field is generated by the lo...
Definition: client_event_without_room_id.hpp:16
 
JsonWrap redactedBecause
The event that redacted this event, if any.
Definition: client_event_without_room_id.hpp:19
 
JsonWrap prevContent
The previous content for this event.
Definition: client_event_without_room_id.hpp:29
 
std::optional< std::string > transactionId
The client-supplied transaction ID, for example, provided via PUT /_matrix/client/v3/rooms/{roomId}/s...
Definition: client_event_without_room_id.hpp:24
 
static void to_json(json &jo, const ClientEventWithoutRoomID &pod)
Definition: client_event_without_room_id.hpp:117
 
static void from_json(const json &jo, ClientEventWithoutRoomID &result)
Definition: client_event_without_room_id.hpp:137
 
static void to_json(json &jo, const UnsignedData &pod)
Definition: client_event_without_room_id.hpp:39
 
static void from_json(const json &jo, UnsignedData &result)
Definition: client_event_without_room_id.hpp:53