]> gitweb.ps.run Git - matrix_esp_thesis/blobdiff - examples/SendEncrypted.c
esp32 build, cli
[matrix_esp_thesis] / examples / SendEncrypted.c
index 7e0b1d4b25d23e24f3af40a556ee82a11c3c79d0..0005592693ecf67bb2c4f3ecafad1fa8965ef451 100644 (file)
@@ -23,18 +23,20 @@ main(void)
     MatrixClientSetUserId(&client,\r
         USER_ID);\r
 \r
-    // MatrixMegolmOutSession megolmOutSession;\r
-    // MatrixMegolmOutSessionInit(&megolmOutSession);\r
 \r
-    // MatrixClientSetMegolmOutSession(&client,\r
-    //     ROOM_ID,\r
-    //     megolmOutSession);\r
+    MatrixClientUploadDeviceKeys(&client);\r
 \r
     MatrixClientSendEventEncrypted(&client,\r
         ROOM_ID,\r
         "m.room.message",\r
         "{\"body\":\"Hello\",\"msgtype\":\"m.text\"}");\r
 \r
+    MatrixClientSendToDeviceEncrypted(&client,\r
+        USER_ID,\r
+        "ULZZOKJBYN",\r
+        "{}",\r
+        "m.dummy");\r
+\r
     MatrixClientShareMegolmOutSession(&client,\r
         USER_ID,\r
         "ULZZOKJBYN",\r