aboutsummaryrefslogtreecommitdiffstats
path: root/matrix-connection.c
diff options
context:
space:
mode:
authorRichard van der Hoff <richard@matrix.org>2015-11-02 14:28:02 +0000
committerRichard van der Hoff <richard@matrix.org>2015-11-02 14:28:02 +0000
commitf4c6751e9b1c36a54eace8471fbd80a27ec674ac (patch)
tree5fd836e0a85fdac425184318331bae6a10ed47ff /matrix-connection.c
parentf9b67d862caed52dd6494e0aa526ed65dd85c08d (diff)
downloadpurple-matrix-f4c6751e9b1c36a54eace8471fbd80a27ec674ac.tar.gz
Handle incoming room invites
Propagate received invites to the UI, and correctly handle accepting/refusing them.
Diffstat (limited to 'matrix-connection.c')
-rw-r--r--matrix-connection.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/matrix-connection.c b/matrix-connection.c
index c35dcbe..c860ac6 100644
--- a/matrix-connection.c
+++ b/matrix-connection.c
@@ -292,3 +292,12 @@ void matrix_connection_join_room(struct _PurpleConnection *pc,
matrix_api_join_room(conn, room, _join_completed, _join_error, _join_failed,
copy);
}
+
+
+void matrix_connection_reject_invite(struct _PurpleConnection *pc,
+ const gchar *room_id)
+{
+ MatrixConnectionData *conn = purple_connection_get_protocol_data(pc);
+
+ matrix_api_leave_room(conn, room_id, NULL, NULL, NULL, NULL);
+}