From 931057accfdd2756686c3c896a22157b3f5faf51 Mon Sep 17 00:00:00 2001 From: Mark Haines Date: Wed, 30 Sep 2015 10:30:39 +0100 Subject: [PATCH] Add a top level presence key for the presence events and remove the public_user_data/private_user_data for now --- .../v2_alpha/definitions/sync_filter.json | 9 ++----- api/client-server/v2_alpha/filter.yaml | 22 +++++----------- api/client-server/v2_alpha/sync.yaml | 26 +++---------------- 3 files changed, 11 insertions(+), 46 deletions(-) diff --git a/api/client-server/v2_alpha/definitions/sync_filter.json b/api/client-server/v2_alpha/definitions/sync_filter.json index b909830b..0cd6a798 100644 --- a/api/client-server/v2_alpha/definitions/sync_filter.json +++ b/api/client-server/v2_alpha/definitions/sync_filter.json @@ -21,14 +21,9 @@ } } }, - "public_user_data": { + "presence": { "description": - "The public user data, e.g. profile and presence, to include.", - "allOf": [{"$ref": "definitions/event_filter.json"}] - }, - "private_user_data": { - "description": - "Events that are private to a user but shared amoungst their devices, e.g. notification settings, to include.", + "The presence updates to include.", "allOf": [{"$ref": "definitions/event_filter.json"}] }, "event_format": { diff --git a/api/client-server/v2_alpha/filter.yaml b/api/client-server/v2_alpha/filter.yaml index 9bda2359..30d52844 100644 --- a/api/client-server/v2_alpha/filter.yaml +++ b/api/client-server/v2_alpha/filter.yaml @@ -62,14 +62,9 @@ paths: "not_senders": ["@spam:example.com"] } }, - "public_user_data": { - "types": ["m.presence"] - }, - "private_user_data": { - "types": [] - }, - "server_data": { - "types": [] + "presence": { + "types": ["m.presence"], + "not_senders": ["@alice:example.com"] }, "event_format": "client", "event_fields": ["type", "content", "sender"] @@ -131,14 +126,9 @@ paths: "not_senders": ["@spam:example.com"] } }, - "public_user_data": { - "types": ["m.presence"] - }, - "private_user_data": { - "types": [] - }, - "server_data": { - "types": [] + "presence": { + "types": ["m.presence"], + "not_senders": ["@alice:example.com"] }, "event_format": "client", "event_fields": ["type", "content", "sender"] diff --git a/api/client-server/v2_alpha/sync.yaml b/api/client-server/v2_alpha/sync.yaml index 58a2c495..238fab63 100644 --- a/api/client-server/v2_alpha/sync.yaml +++ b/api/client-server/v2_alpha/sync.yaml @@ -110,37 +110,17 @@ paths: in the timeline or state of the room. E.g. typing. allOf: - $ref: "definitions/event_batch.json" - public_user_data: + presence: description: |- - The updates to publicly visible user data. - allOf: - - $ref: "definitions/event_batch.json" - private_user_data: - description: |- - Updates to the data which is private to the user but shared - amongst their devices. + The updates to the presence status of other users. allOf: - $ref: "definitions/event_batch.json" examples: application/json: |- { "next_batch": "s72595_4483_1934", - "private_user_data": { + "presence": { "events": [ - { - "sender": "@bob:example.com", - "type": "com.example.weird.setting", - "content": {"setting1": true, "setting2": false} - } - ] - }, - "public_user_data": { - "events": [ - { - "sender": "@alice:example.com", - "type": "m.profile.display_name", - "content": {"display_name": "Alice"} - }, { "sender": "@alice:example.com", "type": "m.presence",