diff options
| author | Patrick | 2023-11-14 13:12:41 +0100 |
|---|---|---|
| committer | Patrick | 2023-11-14 13:12:41 +0100 |
| commit | be730e09b6376a40fd3852d5a2c8876b27c2c7bb (patch) | |
| tree | fd7b8ec2f21c8f9074259df9b0b37fe499fa4171 /examples/SendEncrypted.c | |
| parent | 58e0d63958d7406b7bbf3b964d9ea9a2770e0741 (diff) | |
| download | matrix_esp_thesis-be730e09b6376a40fd3852d5a2c8876b27c2c7bb.tar.gz matrix_esp_thesis-be730e09b6376a40fd3852d5a2c8876b27c2c7bb.zip | |
update examples
Diffstat (limited to 'examples/SendEncrypted.c')
| -rw-r--r-- | examples/SendEncrypted.c | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/examples/SendEncrypted.c b/examples/SendEncrypted.c index 3debeab..749037d 100644 --- a/examples/SendEncrypted.c +++ b/examples/SendEncrypted.c @@ -1,9 +1,16 @@ #include <matrix.h>
#include <stdio.h>
-#define SERVER "https://matrix.org"
-#define USER_ID "@pscho:matrix.org"
-#define ROOM_ID "!XKFUjAsGrSSrpDFIxB:matrix.org"
+#define SERVER "https://matrix.org"
+#define USER_ID "@example:matrix.org"
+#define ROOM_ID "!example:matrix.org"
+#define USERNAME ""
+#define PASSWORD ""
+#define DEVICE_NAME ""
+
+// device id of another device to share the megolm session with
+// I used the device id of a logged in Element web session
+#define DEVICE_ID2 ""
int
main(void)
@@ -16,9 +23,9 @@ main(void) MatrixClientSetUserId(&client, USER_ID);
MatrixClientLoginPassword(&client,
- "pscho",
- "Wc23EbmB9G3faMq",
- "Test1");
+ USERNAME,
+ PASSWORD,
+ DEVICE_NAME);
MatrixClientUploadDeviceKeys(&client);
MatrixClientGenerateOnetimeKeys(&client, 10);
@@ -33,7 +40,7 @@ main(void) MatrixClientShareMegolmOutSession(&client,
USER_ID,
- "ULZZOKJBYN",
+ DEVICE_ID2,
megolmOutSession);
MatrixClientSendEventEncrypted(&client,
|
