blob: 95167cc0eb226d1fea2710760dffd9b4b981a55b (
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
|
#include <matrix.h>
#define SERVER FixedBuf("matrix.org")
#define ACCESS_TOKEN FixedBuf("abc")
#define ROOM_ID FixedBuf("!jhpZBTbckszblMYjMK:matrix.org")
int
main(
int argc,
char **argv)
{
MatrixClient client;
MatrixClientCreate(&client,
SERVER);
MatrixClientSetAccessToken(&client,
ACCESS_TOKEN);
MatrixClientSendEvent(&client,
ROOM_ID,
FixedBuf("m.room.message"),
FixedBuf("{\"body\":\"Hello\",\"msgtype\":\"m.text\"}"));
return 0;
}
|