diff --git a/src/matrix-http-api.c b/src/matrix-http-api.c index 38f4d3e..5eb3f6e 100644 --- a/src/matrix-http-api.c +++ b/src/matrix-http-api.c @@ -1331,6 +1331,27 @@ i_set_user_presence(MatrixAPI *api, g_free(path); } +static void +i_update_pusher(MatrixAPI *api, + MatrixAPICallback callback, + gpointer user_data, + MatrixAPIPusher *pusher, + GError **error) +{ + JsonNode *pusher_node; + + if ((pusher_node = matrix_api_pusher_get_json_node( + pusher, error)) == NULL) { + return; + } + + _send(MATRIX_HTTP_API(api), + callback, user_data, + CALL_API, + "POST", "pushers/set", NULL, NULL, pusher_node, NULL, + FALSE, error); +} + static void matrix_http_api_matrix_api_init(MatrixAPIInterface *iface) { @@ -1353,7 +1374,7 @@ matrix_http_api_matrix_api_init(MatrixAPIInterface *iface) iface->set_user_presence = i_set_user_presence; /* Push notifications */ - iface->update_pusher = NULL; + iface->update_pusher = i_update_pusher; iface->get_pushers = NULL; iface->delete_pusher = NULL; iface->get_pusher = NULL;