Merge pull request #268 from matrix-org/rav/add_event_to_context
Add 'event' to event context API
This commit is contained in:
commit
cb87da12f2
2 changed files with 17 additions and 10 deletions
|
@ -67,23 +67,28 @@ paths:
|
||||||
A list of room events that happened just before the
|
A list of room events that happened just before the
|
||||||
requested event.
|
requested event.
|
||||||
items:
|
items:
|
||||||
type: object
|
allOf:
|
||||||
title: RoomEvent
|
- "$ref": "../../event-schemas/schema/core-event-schema/room_event.yaml"
|
||||||
|
event:
|
||||||
|
description: |-
|
||||||
|
Details of the requested event.
|
||||||
|
allOf:
|
||||||
|
- "$ref": "../../event-schemas/schema/core-event-schema/room_event.yaml"
|
||||||
events_after:
|
events_after:
|
||||||
type: array
|
type: array
|
||||||
description: |-
|
description: |-
|
||||||
A list of room events that happened just after the
|
A list of room events that happened just after the
|
||||||
requested event.
|
requested event.
|
||||||
items:
|
items:
|
||||||
type: object
|
allOf:
|
||||||
title: RoomEvent
|
- "$ref": "../../event-schemas/schema/core-event-schema/room_event.yaml"
|
||||||
state:
|
state:
|
||||||
type: array
|
type: array
|
||||||
description: |-
|
description: |-
|
||||||
The state of the room at the last event returned.
|
The state of the room at the last event returned.
|
||||||
items:
|
items:
|
||||||
type: object
|
allOf:
|
||||||
title: RoomEvent
|
- "$ref": "../../event-schemas/schema/core-event-schema/state_event.yaml"
|
||||||
examples:
|
examples:
|
||||||
application/json: |-
|
application/json: |-
|
||||||
{
|
{
|
||||||
|
@ -99,7 +104,7 @@ paths:
|
||||||
"origin_server_ts": 1446030608551,
|
"origin_server_ts": 1446030608551,
|
||||||
"room_id": "!sCDvXTtzjpiPxaqkkt:localhost:8480",
|
"room_id": "!sCDvXTtzjpiPxaqkkt:localhost:8480",
|
||||||
"type": "m.room.message",
|
"type": "m.room.message",
|
||||||
"user_id": "@test:localhost:8480"
|
"sender": "@test:localhost:8480"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"events_before": [
|
"events_before": [
|
||||||
|
@ -113,7 +118,7 @@ paths:
|
||||||
"origin_server_ts": 1446030607984,
|
"origin_server_ts": 1446030607984,
|
||||||
"room_id": "!sCDvXTtzjpiPxaqkkt:localhost:8480",
|
"room_id": "!sCDvXTtzjpiPxaqkkt:localhost:8480",
|
||||||
"type": "m.room.message",
|
"type": "m.room.message",
|
||||||
"user_id": "@test:localhost:8480"
|
"sender": "@test:localhost:8480"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"start": "t27-54_2_0_2",
|
"start": "t27-54_2_0_2",
|
||||||
|
@ -128,7 +133,7 @@ paths:
|
||||||
"room_id": "!sCDvXTtzjpiPxaqkkt:localhost:8480",
|
"room_id": "!sCDvXTtzjpiPxaqkkt:localhost:8480",
|
||||||
"state_key": "",
|
"state_key": "",
|
||||||
"type": "m.room.create",
|
"type": "m.room.create",
|
||||||
"user_id": "@test:localhost:8480"
|
"sender": "@test:localhost:8480"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"age": 2067105053,
|
"age": 2067105053,
|
||||||
|
@ -143,7 +148,7 @@ paths:
|
||||||
"room_id": "!sCDvXTtzjpiPxaqkkt:localhost:8480",
|
"room_id": "!sCDvXTtzjpiPxaqkkt:localhost:8480",
|
||||||
"state_key": "@test:localhost:8480",
|
"state_key": "@test:localhost:8480",
|
||||||
"type": "m.room.member",
|
"type": "m.room.member",
|
||||||
"user_id": "@test:localhost:8480"
|
"sender": "@test:localhost:8480"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,6 +9,8 @@ specified event. This allows clients to get the context surrounding an event.
|
||||||
Client behaviour
|
Client behaviour
|
||||||
----------------
|
----------------
|
||||||
|
|
||||||
|
There is a single HTTP API for retrieving event context, documented below.
|
||||||
|
|
||||||
{{event_context_http_api}}
|
{{event_context_http_api}}
|
||||||
|
|
||||||
Security considerations
|
Security considerations
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue