mirror of
https://github.com/superseriousbusiness/gotosocial
synced 2025-06-05 21:59:39 +02:00
[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:
@@ -74,15 +74,17 @@ type processor struct {
|
||||
filter visibility.Filter
|
||||
formatter text.Formatter
|
||||
fromClientAPI chan messages.FromClientAPI
|
||||
parseMention gtsmodel.ParseMentionFunc
|
||||
}
|
||||
|
||||
// New returns a new status processor.
|
||||
func New(db db.DB, tc typeutils.TypeConverter, fromClientAPI chan messages.FromClientAPI) Processor {
|
||||
func New(db db.DB, tc typeutils.TypeConverter, fromClientAPI chan messages.FromClientAPI, parseMention gtsmodel.ParseMentionFunc) Processor {
|
||||
return &processor{
|
||||
tc: tc,
|
||||
db: db,
|
||||
filter: visibility.NewFilter(db),
|
||||
formatter: text.NewFormatter(db),
|
||||
fromClientAPI: fromClientAPI,
|
||||
parseMention: parseMention,
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user