From 280265a0c0ba613340c644f3941f0b0a33eb40f7 Mon Sep 17 00:00:00 2001 From: Vyr Cossont Date: Thu, 13 Nov 2025 14:16:43 +0100 Subject: [bugfix] Add Swagger docs for the user:notification stream (#4555) # Description Documents the `user:notification` stream, which was missing from API docs. Also notes that the `user` stream includes notifications as well. - Fixes #4340 ## Checklist - [x] I/we have read the [GoToSocial contribution guidelines](https://codeberg.org/superseriousbusiness/gotosocial/src/branch/main/CONTRIBUTING.md). - [x] I/we have discussed the proposed changes already, either in an issue on the repository, or in the Matrix chat. - [x] I/we have not leveraged AI to create the proposed changes. - [ ] I/we have performed a self-review of added code. - [ ] I/we have written code that is legible and maintainable by others. - [ ] I/we have commented the added code, particularly in hard-to-understand areas. - [x] I/we have made any necessary changes to documentation. - [ ] I/we have added tests that cover new code. - [ ] I/we have run tests and they pass locally with the changes. - [ ] I/we have run `go fmt ./...` and `golangci-lint run`. Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4555 Co-authored-by: Vyr Cossont Co-committed-by: Vyr Cossont --- internal/api/client/streaming/stream.go | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'internal/api/client') diff --git a/internal/api/client/streaming/stream.go b/internal/api/client/streaming/stream.go index 7af540651..8a018cae6 100644 --- a/internal/api/client/streaming/stream.go +++ b/internal/api/client/streaming/stream.go @@ -71,12 +71,22 @@ var pingMsg = []byte("ping!") // - // name: stream // type: string +// enum: +// - user +// - user:notification +// - public +// - public:local +// - hashtag +// - hashtag:local +// - list +// - direct // description: |- // Type of stream to request. // // Options are: // -// `user`: receive updates for the account's home timeline. +// `user`: receive updates for the account's home timeline, and notifications for the account. +// `user:notification`: receive notifications for the account. // `public`: receive updates for the public timeline. // `public:local`: receive updates for the local timeline. // `hashtag`: receive updates for a given hashtag. @@ -115,6 +125,7 @@ var pingMsg = []byte("ping!") // type: string // enum: // - user +// - user:notification // - public // - public:local // - hashtag -- cgit v1.2.3