diff options
| author | Patrick | 2023-06-29 07:13:02 +0200 |
|---|---|---|
| committer | Patrick | 2023-06-29 07:13:02 +0200 |
| commit | fb5f3a8652d1cd3e4d8207f8718359f90636b5b3 (patch) | |
| tree | 3a58d8f904b32c02f6c21f9920d84a31e7a03e43 /examples | |
| parent | a8515e0eed66fa9d48297d4d5b2176ca564193ce (diff) | |
| download | matrix_esp_thesis-fb5f3a8652d1cd3e4d8207f8718359f90636b5b3.tar.gz matrix_esp_thesis-fb5f3a8652d1cd3e4d8207f8718359f90636b5b3.zip | |
generate key upload json + json signing
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/Keys.c | 4 | ||||
| -rw-r--r-- | examples/SendEncrypted.c | 9 |
2 files changed, 12 insertions, 1 deletions
diff --git a/examples/Keys.c b/examples/Keys.c index 77196ba..6dc2cc0 100644 --- a/examples/Keys.c +++ b/examples/Keys.c @@ -15,6 +15,10 @@ main(void) SERVER);
MatrixHttpInit(&client);
+
+ MatrixClientSetAccessToken(&client, ACCESS_TOKEN);
+ MatrixClientSetDeviceId(&client, DEVICE_ID);
+ MatrixClientSetUserId(&client, USER_ID);
MatrixClientGenerateOnetimeKeys(&client,
10);
diff --git a/examples/SendEncrypted.c b/examples/SendEncrypted.c index 0c4a7c8..f2bb8df 100644 --- a/examples/SendEncrypted.c +++ b/examples/SendEncrypted.c @@ -4,7 +4,8 @@ #define SERVER "https://matrix.org"
#define ACCESS_TOKEN "syt_cHNjaG8_yBvTjVTquGCikvsAenOJ_49mBMO"
#define DEVICE_ID "MAZNCCZLBR"
-#define ROOM_ID "!koVStwyiiKcBVbXZYz:matrix.org"
+#define USER_ID "@pscho:matrix.org"
+#define ROOM_ID "!XKFUjAsGrSSrpDFIxB:matrix.org"
int
main(void)
@@ -19,6 +20,8 @@ main(void) ACCESS_TOKEN);
MatrixClientSetDeviceId(&client,
DEVICE_ID);
+ MatrixClientSetUserId(&client,
+ USER_ID);
// MatrixMegolmOutSession megolmOutSession;
// MatrixMegolmOutSessionInit(&megolmOutSession);
@@ -31,6 +34,10 @@ main(void) ROOM_ID,
"m.room.message",
"{\"body\":\"Hello\",\"msgtype\":\"m.text\"}");
+
+ MatrixClientShareMegolmOutSessionTest(&client,
+ "ULZZOKJBYN",
+ &client.megolmOutSessions[0]);
MatrixHttpDeinit(&client);
|
