Go to the documentation of this file.
13 struct ThirdPartySigned
26 immer::map<std::string, immer::map<std::string, std::string>>
signatures;
38 if (! jo.is_object()) { jo = json::object(); }
41 jo[
"sender"s] = pod.sender;
43 jo[
"mxid"s] = pod.mxid;
45 jo[
"token"s] = pod.token;
47 jo[
"signatures"s] = pod.signatures;
53 if (jo.contains(
"sender"s)) {
54 result.sender = jo.at(
"sender"s);
56 if (jo.contains(
"mxid"s)) {
57 result.mxid = jo.at(
"mxid"s);
59 if (jo.contains(
"token"s)) {
60 result.token = jo.at(
"token"s);
62 if (jo.contains(
"signatures"s)) {
63 result.signatures = jo.at(
"signatures"s);
static void to_json(json &jo, const ThirdPartySigned &pod)
Definition: third_party_signed.hpp:36
A signature of an m.third_party_invite token to prove that this user owns a third party identity whic...
Definition: third_party_signed.hpp:15
static void from_json(const json &jo, ThirdPartySigned &result)
Definition: third_party_signed.hpp:50
std::string sender
The Matrix ID of the user who issued the invite.
Definition: third_party_signed.hpp:21
Definition: location.hpp:26
std::string token
The state key of the m.third_party_invite event.
Definition: third_party_signed.hpp:27
Definition: location.hpp:10
immer::map< std::string, immer::map< std::string, std::string > > signatures
A signatures object containing a signature of the entire signed object.
Definition: third_party_signed.hpp:30
nlohmann::json json
Definition: jsonwrap.hpp:20
Definition: location.hpp:10
std::string mxid
The Matrix ID of the invitee.
Definition: third_party_signed.hpp:24