diff options
author | Damien Zammit <damien@zamaudio.com> | 2016-12-31 21:13:34 +1100 |
---|---|---|
committer | Damien Zammit <damien@zamaudio.com> | 2017-01-05 21:53:21 +1100 |
commit | 2c17db466d7631eee7bcf4e7505b03115ce901e3 (patch) | |
tree | 106f9f8bb646c775742a3a76a2276699214cc910 /matrix-api.h | |
parent | 61ffd59e2e658daec87f79a8d05a9d202d76e9a3 (diff) | |
download | purple-matrix-2c17db466d7631eee7bcf4e7505b03115ce901e3.tar.gz |
Enable room invites when matrix handle is known
Signed-off-by: Damien Zammit <damien@zamaudio.com>
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 4245cd7..3359e0e 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 |