aboutsummaryrefslogtreecommitdiff
path: root/lib/csapi/definitions/third_party_signed.h
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2020-06-07 19:46:40 +0200
committerKitsune Ral <Kitsune-Ral@users.sf.net>2020-06-07 19:46:40 +0200
commit32729d9a7519cd2c4cddb0174b8329c6fd4a4a83 (patch)
tree9a966d7dc0bf628f610d5de1ad64c8d29b6b26f8 /lib/csapi/definitions/third_party_signed.h
parenta0430b1fb722a77ad7cbd28f181727d46d92b3a2 (diff)
downloadlibquotient-32729d9a7519cd2c4cddb0174b8329c6fd4a4a83.tar.gz
libquotient-32729d9a7519cd2c4cddb0174b8329c6fd4a4a83.zip
Update generated files according to gtad/* changes
Diffstat (limited to 'lib/csapi/definitions/third_party_signed.h')
-rw-r--r--lib/csapi/definitions/third_party_signed.h44
1 files changed, 44 insertions, 0 deletions
diff --git a/lib/csapi/definitions/third_party_signed.h b/lib/csapi/definitions/third_party_signed.h
new file mode 100644
index 00000000..526545d0
--- /dev/null
+++ b/lib/csapi/definitions/third_party_signed.h
@@ -0,0 +1,44 @@
+/******************************************************************************
+ * THIS FILE IS GENERATED - ANY EDITS WILL BE OVERWRITTEN
+ */
+
+#pragma once
+
+#include "converters.h"
+
+namespace Quotient {
+/// A signature of an ``m.third_party_invite`` token to prove that this user
+/// owns a third party identity which has been invited to the room.
+struct ThirdPartySigned {
+ /// The Matrix ID of the user who issued the invite.
+ QString sender;
+
+ /// The Matrix ID of the invitee.
+ QString mxid;
+
+ /// The state key of the m.third_party_invite event.
+ QString token;
+
+ /// A signatures object containing a signature of the entire signed object.
+ QHash<QString, QHash<QString, QString>> signatures;
+};
+
+template <>
+struct JsonObjectConverter<ThirdPartySigned> {
+ static void dumpTo(QJsonObject& jo, const ThirdPartySigned& pod)
+ {
+ addParam<>(jo, QStringLiteral("sender"), pod.sender);
+ addParam<>(jo, QStringLiteral("mxid"), pod.mxid);
+ addParam<>(jo, QStringLiteral("token"), pod.token);
+ addParam<>(jo, QStringLiteral("signatures"), pod.signatures);
+ }
+ static void fillFrom(const QJsonObject& jo, ThirdPartySigned& pod)
+ {
+ fromJson(jo.value("sender"_ls), pod.sender);
+ fromJson(jo.value("mxid"_ls), pod.mxid);
+ fromJson(jo.value("token"_ls), pod.token);
+ fromJson(jo.value("signatures"_ls), pod.signatures);
+ }
+};
+
+} // namespace Quotient