diff options
author | Richard van der Hoff <github@rvanderhoff.org.uk> | 2017-01-05 11:10:14 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-01-05 11:10:14 +0000 |
commit | ccf49582556edc17c75df1073d61d8bebfede744 (patch) | |
tree | dabd709ac65a013cc80b1253003ec9dd607f7f08 /matrix-api.h | |
parent | 28edbbba2b8642c067d24b6e0d504fe7039639d1 (diff) | |
parent | 2c17db466d7631eee7bcf4e7505b03115ce901e3 (diff) | |
download | purple-matrix-ccf49582556edc17c75df1073d61d8bebfede744.tar.gz |
Merge pull request #24 from zamaudio/enable-invite
Enable room invites when matrix handle is known
Diffstat (limited to 'matrix-api.h')
-rw-r--r-- | matrix-api.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/matrix-api.h b/matrix-api.h index 8448af5..8463a93 100644 --- a/matrix-api.h +++ b/matrix-api.h @@ -189,6 +189,30 @@ MatrixApiRequestData *matrix_api_send(MatrixConnectionData *conn, MatrixApiBadResponseCallback bad_response_callback, gpointer user_data); +/** + * Invite a user to a room + * + * @param conn The connection with which to make the request + * @param room_id The room id to invite the user to + * + * @param who The mxid of the person to invite + * + * @param callback Function to be called when the request completes + * @param error_callback Function to be called if there is an error making + * the request. If NULL, matrix_api_error will be + * used. + * @param bad_response_callback Function to be called if the API gives a non-200 + * response. If NULL, matrix_api_bad_response will be + * used. + * @param user_data Opaque data to be passed to the callbacks + */ +void matrix_api_invite_user(MatrixConnectionData *conn, + const gchar *room_id, + const gchar *who, + MatrixApiCallback callback, + MatrixApiErrorCallback error_callback, + MatrixApiBadResponseCallback bad_response_callback, + gpointer user_data); /** * Make a request to join a room |