X-Git-Url: https://gitweb.ps.run/matrix_esp_thesis/blobdiff_plain/fb5f3a8652d1cd3e4d8207f8718359f90636b5b3..464bfb1912d0806143386f61c33dd45fbafc38e8:/examples/SendEncrypted.c diff --git a/examples/SendEncrypted.c b/examples/SendEncrypted.c index f2bb8df..0005592 100644 --- a/examples/SendEncrypted.c +++ b/examples/SendEncrypted.c @@ -23,19 +23,22 @@ main(void) MatrixClientSetUserId(&client, USER_ID); - // MatrixMegolmOutSession megolmOutSession; - // MatrixMegolmOutSessionInit(&megolmOutSession); - // MatrixClientSetMegolmOutSession(&client, - // ROOM_ID, - // megolmOutSession); + MatrixClientUploadDeviceKeys(&client); MatrixClientSendEventEncrypted(&client, ROOM_ID, "m.room.message", "{\"body\":\"Hello\",\"msgtype\":\"m.text\"}"); - MatrixClientShareMegolmOutSessionTest(&client, + MatrixClientSendToDeviceEncrypted(&client, + USER_ID, + "ULZZOKJBYN", + "{}", + "m.dummy"); + + MatrixClientShareMegolmOutSession(&client, + USER_ID, "ULZZOKJBYN", &client.megolmOutSessions[0]);