aboutsummaryrefslogtreecommitdiffstats
path: root/matrix-sync.c
diff options
context:
space:
mode:
authorDr. David Alan Gilbert <dave@treblig.org>2017-09-03 03:13:54 +0100
committerDr. David Alan Gilbert <dave@treblig.org>2018-02-25 02:08:49 +0000
commit1527d398362c082c7b2fabefb4d2446e1567b522 (patch)
tree0698a29f8a70e9aed6403d31444ff67cfa6ce9da /matrix-sync.c
parent4da49463f2910f8d0a84f6979475af4a11ef3189 (diff)
downloadpurple-matrix-1527d398362c082c7b2fabefb4d2446e1567b522.tar.gz
e2e: Route key count from sync
Route the count of remaining one time keys out of the sync result. We need the newer (v2?) API for this. Signed-off-by: Dr. David Alan Gilbert <dave@treblig.org>
Diffstat (limited to 'matrix-sync.c')
-rw-r--r--matrix-sync.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/matrix-sync.c b/matrix-sync.c
index 6456a7e..56a42bb 100644
--- a/matrix-sync.c
+++ b/matrix-sync.c
@@ -327,6 +327,12 @@ void matrix_sync_parse(PurpleConnection *pc, JsonNode *body,
}
}
+ JsonObject *dev_key_counts = matrix_json_object_get_object_member(rootObj,
+ "device_one_time_keys_count");
+ if (dev_key_counts) {
+ matrix_e2e_handle_sync_key_counts(pc, dev_key_counts, FALSE);
+ }
+
/* Now go round the rooms again getting the timeline events */
if (joined_rooms != NULL) {
room_ids = json_object_get_members(joined_rooms);