From ba96974bdebd6d4ec345907d49944b5ee644ed47 Mon Sep 17 00:00:00 2001 From: Owen Jacobson Date: Wed, 9 Oct 2024 00:57:31 -0400 Subject: Provide a view of logins to clients. --- docs/api.md | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) (limited to 'docs') diff --git a/docs/api.md b/docs/api.md index 56d361d..4145aa8 100644 --- a/docs/api.md +++ b/docs/api.md @@ -25,6 +25,12 @@ Returns information needed to boot the client. Also the recommended way to check "id": "L1234abcd", }, "resume_point": "1312", + "logins": [ + { + "id": "L1234abcd", + "name": "example username" + } + ], "channels": [ { "name": "nonsense and such", @@ -32,10 +38,7 @@ Returns information needed to boot the client. Also the recommended way to check "messages": [ { "at": "2024-09-27T23:19:10.208147Z", - "sender": { - "id": "L1234abcd", - "name": "example username" - }, + "sender": "L1234abcd", "id": "M1312acab", "body": "beep" } @@ -198,6 +201,15 @@ The event IDs `hi` sends in `application/event-stream` encoding are ephemeral, a The returned event stream is a sequence of events: ```json +id: 1232 +data: { +data: "type": "login", +data: "event": "created", +data: "at": "2024-09-27T23:17:10.208147Z", +data: "id": "L1234abcd", +data: "name": "example username" +data: } + id: 1233 data: { data: "type": "channel", @@ -213,10 +225,7 @@ data: "type": "message", data: "event": "sent", data: "at": "2024-09-27T23:19:10.208147Z", data: "channel": "C9876cyyz", -data: "sender": { -data: "id": "L1234abcd", -data: "name": "example username" -data: }, +data: "sender": "L1234abcd", data: "id": "M1312acab", data: "body": "beep" data: } -- cgit v1.2.3