Skip to content

Commit bba76c2

Browse files
authored
Merge pull request #1552 from turt2live/travis/as/normal-events
Specify that application services receive events in the CSAPI format
2 parents 87133d8 + 17e0ef4 commit bba76c2

File tree

2 files changed

+8
-39
lines changed

2 files changed

+8
-39
lines changed

api/application-service/application_service.yaml renamed to api/application-service/transactions.yaml

Lines changed: 6 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@ schemes:
2121
- https
2222
- http
2323
basePath: "/"
24-
consumes:
25-
- application/json
2624
produces:
2725
- application/json
2826
paths:
@@ -53,37 +51,16 @@ paths:
5351
type: object
5452
example: {
5553
"events": [
56-
{
57-
"age": 32,
58-
"content": {
59-
"body": "incoming message",
60-
"msgtype": "m.text"
61-
},
62-
"event_id": "$14328055551tzaee:localhost",
63-
"origin_server_ts": 1432804485886,
64-
"room_id": "!TmaZBKYIFrIPVGoUYp:localhost",
65-
"type": "m.room.message",
66-
"user_id": "@bob:localhost"
67-
},
68-
{
69-
"age": 1984,
70-
"content": {
71-
"body": "another incoming message",
72-
"msgtype": "m.text"
73-
},
74-
"event_id": "$1228055551ffsef:localhost",
75-
"origin_server_ts": 1432804485886,
76-
"room_id": "!TmaZBKYIFrIPVGoUYp:localhost",
77-
"type": "m.room.message",
78-
"user_id": "@bob:localhost"
79-
}
54+
{"$ref": "../../event-schemas/examples/m.room.member"},
55+
{"$ref": "../../event-schemas/examples/m.room.message#m.text"}
8056
]
8157
}
82-
description: "Transaction informations"
58+
description: Transaction information
8359
properties:
8460
events:
8561
type: array
86-
description: A list of events
62+
description: |-
63+
A list of events, formatted as per the Client-Server API.
8764
items:
8865
type: object
8966
title: Event
@@ -92,7 +69,6 @@ paths:
9269
200:
9370
description: The transaction was processed successfully.
9471
examples:
95-
application/json: {
96-
}
72+
application/json: {}
9773
schema:
9874
type: object

specification/application_service_api.rst

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,8 @@ be made without blocking other aspects of the homeserver. Homeservers MUST NOT
198198
alter (e.g. add more) events they were going to send within that transaction ID
199199
on retries, as the AS may have already processed the events.
200200

201+
{{transactions_as_http_api}}
202+
201203
Querying
202204
++++++++
203205

@@ -244,15 +246,6 @@ application service for filtering.
244246
{{protocols_as_http_api}}
245247

246248

247-
HTTP APIs
248-
+++++++++
249-
250-
This contains application service APIs which are used by the homeserver. All
251-
application services MUST implement these APIs. These APIs are defined below.
252-
253-
{{application_service_as_http_api}}
254-
255-
256249
.. _create the user: `sect:asapi-permissions`_
257250

258251
Client-Server API Extensions

0 commit comments

Comments
 (0)