diff options
author | 2022-09-28 18:30:40 +0100 | |
---|---|---|
committer | 2022-09-28 18:30:40 +0100 | |
commit | a156188b3eb5cb3da44aa1b7452265f5fa38a607 (patch) | |
tree | 7097fa48d56fbabc7c2c8750b1f3bc9321d71c0f /internal/api/client/streaming/stream.go | |
parent | [bugfix] Fix emphasis being added to emoji shortcodes with markdown parsing (... (diff) | |
download | gotosocial-a156188b3eb5cb3da44aa1b7452265f5fa38a607.tar.xz |
[chore] update dependencies, bump to Go 1.19.1 (#826)
* update dependencies, bump Go version to 1.19
* bump test image Go version
* update golangci-lint
* update gotosocial-drone-build
* sign
* linting, go fmt
* update swagger docs
* update swagger docs
* whitespace
* update contributing.md
* fuckin whoopsie doopsie
* linterino, linteroni
* fix followrequest test not starting processor
* fix other api/client tests not starting processor
* fix remaining tests where processor not started
* bump go-runners version
* don't check last-webfingered-at, processor may have updated this
* update swagger command
* update bun to latest version
* fix embed to work the same as before with new bun
Signed-off-by: kim <grufwub@gmail.com>
Co-authored-by: tsmethurst <tobi.smethurst@protonmail.com>
Diffstat (limited to 'internal/api/client/streaming/stream.go')
-rw-r--r-- | internal/api/client/streaming/stream.go | 169 |
1 files changed, 86 insertions, 83 deletions
diff --git a/internal/api/client/streaming/stream.go b/internal/api/client/streaming/stream.go index 7e2922acf..a406de74b 100644 --- a/internal/api/client/streaming/stream.go +++ b/internal/api/client/streaming/stream.go @@ -35,89 +35,92 @@ var wsUpgrader = websocket.Upgrader{ // // If the ping fails, or something else goes wrong during transmission, then the connection will be dropped, and the client will be expected to start it again. // -// --- -// tags: -// - streaming -// -// produces: -// - application/json -// -// schemes: -// - wss -// -// parameters: -// - name: access_token -// type: string -// description: Access token for the requesting account. -// in: query -// required: true -// - name: stream -// type: string -// description: |- -// Type of stream to request. -// -// Options are: -// -// `user`: receive updates for the account's home timeline. -// `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. -// in: query -// required: true -// security: -// - OAuth2 Bearer: -// - read:streaming -// -// responses: -// '101': -// schema: -// type: object -// properties: -// stream: -// type: array -// items: -// type: string -// enum: -// - user -// - public -// - public:local -// - hashtag -// - hashtag:local -// - list -// - direct -// event: -// description: |- -// The type of event being received. -// -// `update`: a new status has been received. -// `notification`: a new notification has been received. -// `delete`: a status has been deleted. -// `filters_changed`: not implemented. -// type: string -// enum: -// - update -// - notification -// - delete -// - filters_changed -// payload: -// description: |- -// The payload of the streamed message. -// Different depending on the `event` type. -// -// If present, it should be parsed as a string. -// -// If `event` = `update`, then the payload will be a JSON string of a status. -// If `event` = `notification`, then the payload will be a JSON string of a notification. -// If `event` = `delete`, then the payload will be a status ID. -// type: string -// example: "{\"id\":\"01FC3TZ5CFG6H65GCKCJRKA669\",\"created_at\":\"2021-08-02T16:25:52Z\",\"sensitive\":false,\"spoiler_text\":\"\",\"visibility\":\"public\",\"language\":\"en\",\"uri\":\"https://gts.superseriousbusiness.org/users/dumpsterqueer/statuses/01FC3TZ5CFG6H65GCKCJRKA669\",\"url\":\"https://gts.superseriousbusiness.org/@dumpsterqueer/statuses/01FC3TZ5CFG6H65GCKCJRKA669\",\"replies_count\":0,\"reblogs_count\":0,\"favourites_count\":0,\"favourited\":false,\"reblogged\":false,\"muted\":false,\"bookmarked\":fals…//gts.superseriousbusiness.org/fileserver/01JNN207W98SGG3CBJ76R5MVDN/header/original/019036W043D8FXPJKSKCX7G965.png\",\"header_static\":\"https://gts.superseriousbusiness.org/fileserver/01JNN207W98SGG3CBJ76R5MVDN/header/small/019036W043D8FXPJKSKCX7G965.png\",\"followers_count\":33,\"following_count\":28,\"statuses_count\":126,\"last_status_at\":\"2021-08-02T16:25:52Z\",\"emojis\":[],\"fields\":[]},\"media_attachments\":[],\"mentions\":[],\"tags\":[],\"emojis\":[],\"card\":null,\"poll\":null,\"text\":\"a\"}" -// '401': -// description: unauthorized -// '400': -// description: bad request +// --- +// tags: +// - streaming +// +// produces: +// - application/json +// +// schemes: +// - wss +// +// parameters: +// - +// name: access_token +// type: string +// description: Access token for the requesting account. +// in: query +// required: true +// - +// name: stream +// type: string +// description: |- +// Type of stream to request. +// +// Options are: +// +// `user`: receive updates for the account's home timeline. +// `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. +// in: query +// required: true +// +// security: +// - OAuth2 Bearer: +// - read:streaming +// +// responses: +// '101': +// schema: +// type: object +// properties: +// stream: +// type: array +// items: +// type: string +// enum: +// - user +// - public +// - public:local +// - hashtag +// - hashtag:local +// - list +// - direct +// event: +// description: |- +// The type of event being received. +// +// `update`: a new status has been received. +// `notification`: a new notification has been received. +// `delete`: a status has been deleted. +// `filters_changed`: not implemented. +// type: string +// enum: +// - update +// - notification +// - delete +// - filters_changed +// payload: +// description: |- +// The payload of the streamed message. +// Different depending on the `event` type. +// +// If present, it should be parsed as a string. +// +// If `event` = `update`, then the payload will be a JSON string of a status. +// If `event` = `notification`, then the payload will be a JSON string of a notification. +// If `event` = `delete`, then the payload will be a status ID. +// type: string +// example: "{\"id\":\"01FC3TZ5CFG6H65GCKCJRKA669\",\"created_at\":\"2021-08-02T16:25:52Z\",\"sensitive\":false,\"spoiler_text\":\"\",\"visibility\":\"public\",\"language\":\"en\",\"uri\":\"https://gts.superseriousbusiness.org/users/dumpsterqueer/statuses/01FC3TZ5CFG6H65GCKCJRKA669\",\"url\":\"https://gts.superseriousbusiness.org/@dumpsterqueer/statuses/01FC3TZ5CFG6H65GCKCJRKA669\",\"replies_count\":0,\"reblogs_count\":0,\"favourites_count\":0,\"favourited\":false,\"reblogged\":false,\"muted\":false,\"bookmarked\":fals…//gts.superseriousbusiness.org/fileserver/01JNN207W98SGG3CBJ76R5MVDN/header/original/019036W043D8FXPJKSKCX7G965.png\",\"header_static\":\"https://gts.superseriousbusiness.org/fileserver/01JNN207W98SGG3CBJ76R5MVDN/header/small/019036W043D8FXPJKSKCX7G965.png\",\"followers_count\":33,\"following_count\":28,\"statuses_count\":126,\"last_status_at\":\"2021-08-02T16:25:52Z\",\"emojis\":[],\"fields\":[]},\"media_attachments\":[],\"mentions\":[],\"tags\":[],\"emojis\":[],\"card\":null,\"poll\":null,\"text\":\"a\"}" +// '401': +// description: unauthorized +// '400': +// description: bad request func (m *Module) StreamGETHandler(c *gin.Context) { streamType := c.Query(StreamQueryKey) if streamType == "" { |