abouttreesummaryrefslogcommitdiff
path: root/examples/SendEncrypted.c
diff options
context:
space:
mode:
authorPatrick2023-07-10 20:57:49 +0200
committerPatrick2023-07-10 20:57:49 +0200
commit6646bd126f9faf1e687b203512d29da243acaa90 (patch)
treeb69b1217c08a954b83bdc74ee5aeb37ba794b23c /examples/SendEncrypted.c
parentf2840d9dd5b8a0683abee189e408c5a6de294eb7 (diff)
downloadmatrix_esp_thesis-6646bd126f9faf1e687b203512d29da243acaa90.tar.gz
matrix_esp_thesis-6646bd126f9faf1e687b203512d29da243acaa90.zip
more changes towards sharing megolm sessions
Diffstat (limited to 'examples/SendEncrypted.c')
-rw-r--r--examples/SendEncrypted.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/examples/SendEncrypted.c b/examples/SendEncrypted.c
index 7e0b1d4..0005592 100644
--- a/examples/SendEncrypted.c
+++ b/examples/SendEncrypted.c
@@ -23,18 +23,20 @@ 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\"}");
+ MatrixClientSendToDeviceEncrypted(&client,
+ USER_ID,
+ "ULZZOKJBYN",
+ "{}",
+ "m.dummy");
+
MatrixClientShareMegolmOutSession(&client,
USER_ID,
"ULZZOKJBYN",