X-Git-Url: https://gitweb.ps.run/matrix_esp_thesis/blobdiff_plain/2130f565861a560c0f5ce98b3cc0c915e241bf79..HEAD:/examples/SendEncrypted.c 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 #include -#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,