Update flow formatting

This commit is contained in:
Tulir Asokan 2023-05-23 11:47:56 +03:00
parent 08768b4a65
commit 7e1c1a76e7

View file

@ -222,24 +222,27 @@ cases where the appservice is started before the homeserver.
The mechanism works as follows: The mechanism works as follows:
**Typical**
``` ```
Typical
AS ---> HS : /_matrix/client/v1/appservice/{appserviceId}/ping {"transaction_id": "meow"} AS ---> HS : /_matrix/client/v1/appservice/{appserviceId}/ping {"transaction_id": "meow"}
HS ---> AS : /_matrix/app/v1/ping {"transaction_id": "meow"} HS ---> AS : /_matrix/app/v1/ping {"transaction_id": "meow"}
HS <--- AS : 200 OK {} HS <--- AS : 200 OK {}
AS <--- HS : 200 OK {"duration_ms": 123} AS <--- HS : 200 OK {"duration_ms": 123}
``` ```
**Incorrect `hs_token`**
``` ```
Incorrect hs_token
AS ---> HS : /_matrix/client/v1/appservice/{appserviceId}/ping {"transaction_id": "meow"} AS ---> HS : /_matrix/client/v1/appservice/{appserviceId}/ping {"transaction_id": "meow"}
HS ---> AS : /_matrix/app/v1/ping {"transaction_id": "meow"} HS ---> AS : /_matrix/app/v1/ping {"transaction_id": "meow"}
HS <--- AS : 401 Unauthorized {"errcode": "M_UNKNOWN_TOKEN"} HS <--- AS : 401 Unauthorized {"errcode": "M_UNKNOWN_TOKEN"}
AS <--- HS : 502 Bad Gateway {"errcode": "M_BAD_STATUS", "status": 401, "body": "{\"errcode\": \"M_UNKNOWN_TOKEN\"}"} AS <--- HS : 502 Bad Gateway {"errcode": "M_BAD_STATUS", "status": 401, "body": "{\"errcode\": \"M_UNKNOWN_TOKEN\"}"}
``` ```
**Can't connect to appservice**
``` ```
Can't connect to appservice
AS ---> HS : /_matrix/client/v1/appservice/{appserviceId}/ping {"transaction_id": "meow"} AS ---> HS : /_matrix/client/v1/appservice/{appserviceId}/ping {"transaction_id": "meow"}
HS -/-> AS : /_matrix/app/v1/ping {"transaction_id": "meow"} HS -/-> AS : /_matrix/app/v1/ping {"transaction_id": "meow"}
AS <--- HS : 502 Bad Gateway {"errcode": "M_CONNECTION_FAILED"} AS <--- HS : 502 Bad Gateway {"errcode": "M_CONNECTION_FAILED"}