diff options
| author | 2025-11-13 14:16:43 +0100 | |
|---|---|---|
| committer | 2025-11-17 14:15:40 +0100 | |
| commit | 280265a0c0ba613340c644f3941f0b0a33eb40f7 (patch) | |
| tree | ccd60f5455cde9dd4c6daf7fa0228915f2c0ad71 | |
| parent | [bugfix] Fix async-emoji-loading (#4553) (diff) | |
| download | gotosocial-280265a0c0ba613340c644f3941f0b0a33eb40f7.tar.xz | |
[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 <vyr@noreply.codeberg.org>
Co-committed-by: Vyr Cossont <vyr@noreply.codeberg.org>
| -rw-r--r-- | docs/api/swagger.yaml | 13 | ||||
| -rw-r--r-- | internal/api/client/streaming/stream.go | 13 |
2 files changed, 24 insertions, 2 deletions
diff --git a/docs/api/swagger.yaml b/docs/api/swagger.yaml index d67a01284..87d5d81c2 100644 --- a/docs/api/swagger.yaml +++ b/docs/api/swagger.yaml @@ -13940,13 +13940,23 @@ paths: 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. `hashtag:local`: receive local updates for a given hashtag. `list`: receive updates for a certain list of accounts. `direct`: receive updates for direct messages. + enum: + - user + - user:notification + - public + - public:local + - hashtag + - hashtag:local + - list + - direct in: query name: stream required: true @@ -14001,6 +14011,7 @@ paths: items: enum: - user + - user:notification - public - public:local - hashtag 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 |
