[feature] Dereference remote mentions when the account is not already known (#442)

* remove mention util function from db

* add ParseMentionFunc to gtsmodel

* add parseMentionFunc to processor

* refactor search to simplify it a bit

* add parseMentionFunc to account

* add parseMentionFunc to status

* some renaming for clarity

* test dereference of unknown mentioned account
This commit is contained in:
tobi
2022-03-29 11:54:56 +02:00
committed by GitHub
parent 983e696bd6
commit 37d310f981
16 changed files with 420 additions and 183 deletions

View File

@ -267,12 +267,14 @@ func NewProcessor(
storage *kv.KVStore,
db db.DB,
emailSender email.Sender) Processor {
fromClientAPI := make(chan messages.FromClientAPI, 1000)
fromFederator := make(chan messages.FromFederator, 1000)
parseMentionFunc := GetParseMentionFunc(db, federator)
statusProcessor := status.New(db, tc, fromClientAPI)
statusProcessor := status.New(db, tc, fromClientAPI, parseMentionFunc)
streamingProcessor := streaming.New(db, oauthServer)
accountProcessor := account.New(db, tc, mediaManager, oauthServer, fromClientAPI, federator)
accountProcessor := account.New(db, tc, mediaManager, oauthServer, fromClientAPI, federator, parseMentionFunc)
adminProcessor := admin.New(db, tc, mediaManager, fromClientAPI)
mediaProcessor := mediaProcessor.New(db, tc, mediaManager, federator.TransportController(), storage)
userProcessor := user.New(db, emailSender)