summaryrefslogtreecommitdiff
path: root/internal/processing/processor.go
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2022-02-05 12:47:38 +0100
committerLibravatar GitHub <noreply@github.com>2022-02-05 12:47:38 +0100
commit1b36e858406ff6b15217229d1abaaabdbeec24e8 (patch)
tree2a8dba5c81eb69c87aa0d8c930a4e7e2c5c2cfa6 /internal/processing/processor.go
parent[docs] Fix documentation to show --config-path in the right position. (#375) (diff)
downloadgotosocial-1b36e858406ff6b15217229d1abaaabdbeec24e8.tar.xz
[feature] Rework timeline code to make it useful for more than just statuses (#373)
* add preparable and timelineable interfaces * initialize timeline manager within the processor * generic renaming * move status-specific timeline logic into the processor * refactor timeline to make it useful for more than statuses
Diffstat (limited to 'internal/processing/processor.go')
-rw-r--r--internal/processing/processor.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/internal/processing/processor.go b/internal/processing/processor.go
index f5334a1ef..13fc08c26 100644
--- a/internal/processing/processor.go
+++ b/internal/processing/processor.go
@@ -237,7 +237,7 @@ type processor struct {
oauthServer oauth.Server
mediaHandler media.Handler
storage *kv.KVStore
- timelineManager timeline.Manager
+ statusTimelines timeline.Manager
db db.DB
filter visibility.Filter
@@ -261,7 +261,6 @@ func NewProcessor(
oauthServer oauth.Server,
mediaHandler media.Handler,
storage *kv.KVStore,
- timelineManager timeline.Manager,
db db.DB,
emailSender email.Sender) Processor {
fromClientAPI := make(chan messages.FromClientAPI, 1000)
@@ -274,6 +273,7 @@ func NewProcessor(
mediaProcessor := mediaProcessor.New(db, tc, mediaHandler, storage)
userProcessor := user.New(db, emailSender)
federationProcessor := federationProcessor.New(db, tc, federator, fromFederator)
+ filter := visibility.NewFilter(db)
return &processor{
fromClientAPI: fromClientAPI,
@@ -284,7 +284,7 @@ func NewProcessor(
oauthServer: oauthServer,
mediaHandler: mediaHandler,
storage: storage,
- timelineManager: timelineManager,
+ statusTimelines: timeline.NewManager(StatusGrabFunction(db), StatusFilterFunction(db, filter), StatusPrepareFunction(db, tc), StatusSkipInsertFunction()),
db: db,
filter: visibility.NewFilter(db),