aboutsummaryrefslogtreecommitdiffstats
path: root/matrix-sync.c
diff options
context:
space:
mode:
authorEion Robb <eion@robbmob.com>2017-03-12 22:16:00 +1300
committerEion Robb <eion@robbmob.com>2017-03-12 22:16:00 +1300
commit61ee52f3230724b5c1e8f81caeb16ce7887d183c (patch)
treee7a5f5a66ce2cda993dcb8c4c007e8e14c360fe7 /matrix-sync.c
parentccf49582556edc17c75df1073d61d8bebfede744 (diff)
downloadpurple-matrix-61ee52f3230724b5c1e8f81caeb16ce7887d183c.tar.gz
Send/receive typing notifications
using the "Group Typing Notifications" plugin
Diffstat (limited to 'matrix-sync.c')
-rw-r--r--matrix-sync.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/matrix-sync.c b/matrix-sync.c
index 2d403ef..89926ab 100644
--- a/matrix-sync.c
+++ b/matrix-sync.c
@@ -126,8 +126,8 @@ static PurpleChat *_ensure_blist_entry(PurpleAccount *acct,
static void matrix_sync_room(const gchar *room_id,
JsonObject *room_data, PurpleConnection *pc)
{
- JsonObject *state_object, *timeline_object;
- JsonArray *state_array, *timeline_array;
+ JsonObject *state_object, *timeline_object, *ephemeral_object;
+ JsonArray *state_array, *timeline_array, *ephemeral_array;
PurpleConversation *conv;
gboolean initial_sync = FALSE;
@@ -157,6 +157,12 @@ static void matrix_sync_room(const gchar *room_id,
timeline_object, "events");
if(timeline_array != NULL)
_parse_room_event_array(conv, timeline_array, FALSE);
+
+ /* parse the ephemeral events */
+ ephemeral_object = matrix_json_object_get_object_member(room_data, "ephemeral");
+ ephemeral_array = matrix_json_object_get_array_member(ephemeral_object, "events");
+ if(ephemeral_array != NULL)
+ _parse_room_event_array(conv, ephemeral_array, TRUE);
}