diff options
author | Iru Cai <mytbk920423@gmail.com> | 2018-06-29 13:44:41 +0800 |
---|---|---|
committer | Iru Cai <mytbk920423@gmail.com> | 2018-06-29 13:44:41 +0800 |
commit | 40164b64876f25c9cf53b2b288dabc91e23551d0 (patch) | |
tree | 041c35001b8d091cc7bf8ad8219bc174545ba152 /api.c | |
parent | 1719796a3a10eccf91eadb38c019829110e96294 (diff) | |
download | matrix-curl-40164b64876f25c9cf53b2b288dabc91e23551d0.tar.xz |
room/message
Diffstat (limited to 'api.c')
-rw-r--r-- | api.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -7,6 +7,7 @@ #include "curl_util.h" #include "util.h" #include "device.h" +#include "room.h" /* logout: return 1 if success, 0 if failed */ int matrix_logout(matrix_session *sess, int logout_all) @@ -136,6 +137,9 @@ int main() printf("%s %s\n", devs[i].device_id, devs[i].display_name); } + json_object *msg = get_room_messages(sess, "!DxdsutHRWpSeicUCKs:matrixim.cc", NULL); + printf("%s\n", json_object_to_json_string(msg)); +#if 0 const char *roomid = matrix_resolv_alias(sess, "#hello:my.domain.name"); if (roomid == NULL) puts("fail to resolv #hello:my.domain.name"); @@ -150,6 +154,7 @@ int main() printf("create room %s\n", roomid); if (roomid) free(roomid); +#endif if (matrix_logout(sess, 1)) puts("logout!"); |