diff options
author | 2023-05-25 10:37:38 +0200 | |
---|---|---|
committer | 2023-05-25 10:37:38 +0200 | |
commit | f5c004d67d4ed66b6c6df100afec47174aa14ae0 (patch) | |
tree | 45b72a6e90450d711e10571d844138186fe023c9 /internal/stream/stream.go | |
parent | [docs] local docs hacking howto (#1816) (diff) | |
download | gotosocial-f5c004d67d4ed66b6c6df100afec47174aa14ae0.tar.xz |
[feature] Add List functionality (#1802)
* start working on lists
* further list work
* test list db functions nicely
* more work on lists
* peepoopeepoo
* poke
* start list timeline func
* we're getting there lads
* couldn't be me working on stuff... could it?
* hook up handlers
* fiddling
* weeee
* woah
* screaming, pissing
* fix streaming being a whiny baby
* lint, small test fix, swagger
* tidying up, testing
* fucked! by the linter
* move timelines to state like a boss
* add timeline start to tests using state
* invalidate lists
Diffstat (limited to 'internal/stream/stream.go')
-rw-r--r-- | internal/stream/stream.go | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/internal/stream/stream.go b/internal/stream/stream.go index a5b5bd38b..ae815e029 100644 --- a/internal/stream/stream.go +++ b/internal/stream/stream.go @@ -39,6 +39,8 @@ const ( TimelineNotifications string = "user:notification" // TimelineDirect -- statuses sent to a user directly. TimelineDirect string = "direct" + // TimelineList -- statuses for a user's list timeline. + TimelineList string = "list" ) // AllStatusTimelines contains all Timelines that a status could conceivably be delivered to -- useful for doing deletes. @@ -47,6 +49,7 @@ var AllStatusTimelines = []string{ TimelinePublic, TimelineHome, TimelineDirect, + TimelineList, } // StreamsForAccount is a wrapper for the multiple streams that one account can have running at the same time. @@ -62,10 +65,9 @@ type StreamsForAccount struct { type Stream struct { // ID of this stream, generated during creation. ID string - // A set of timelines of this stream: user/public/etc - // a matching key means the timeline is subscribed. The value - // is ignored - Timelines map[string]bool + // A set of types subscribed to by this stream: user/public/etc. + // It's a map to ensure no duplicates; the value is ignored. + StreamTypes map[string]any // Channel of messages for the client to read from Messages chan *Message // Channel to close when the client drops away |