diff options
author | Dr. David Alan Gilbert <dave@treblig.org> | 2017-09-03 03:13:54 +0100 |
---|---|---|
committer | Dr. David Alan Gilbert <dave@treblig.org> | 2018-02-25 02:08:49 +0000 |
commit | 1527d398362c082c7b2fabefb4d2446e1567b522 (patch) | |
tree | 0698a29f8a70e9aed6403d31444ff67cfa6ce9da /matrix-sync.c | |
parent | 4da49463f2910f8d0a84f6979475af4a11ef3189 (diff) | |
download | purple-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.c | 6 |
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); |