blob: 9ab7dfb82f7e60a6ee701c0b8192e5c6ca55fe1b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
#include <matrix.h>
#define SERVER "https://matrix.org"
#define USER_ID "@pscho:matrix.org"
#define ROOM_ID "!koVStwyiiKcBVbXZYz:matrix.org"
int
main(void)
{
MatrixClient client;
MatrixClientInit(&client,
SERVER);
MatrixHttpInit(&client);
MatrixClientSetUserId(&client, USER_ID);
MatrixClientLoginPassword(&client,
"pscho",
"Wc23EbmB9G3faMq",
"Test1");
MatrixClientSendEvent(&client,
ROOM_ID,
"m.room.message",
"{\"body\":\"Hello\",\"msgtype\":\"m.text\"}");
MatrixClientDeleteDevice(&client);
MatrixHttpDeinit(&client);
return 0;
}
|