From 37d310f981f3e26bc643aeabac134b591c84455a Mon Sep 17 00:00:00 2001 From: tobi <31960611+tsmethurst@users.noreply.github.com> Date: Tue, 29 Mar 2022 11:54:56 +0200 Subject: [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 --- internal/db/db.go | 9 --------- 1 file changed, 9 deletions(-) (limited to 'internal/db/db.go') diff --git a/internal/db/db.go b/internal/db/db.go index 151cc1f97..24205542c 100644 --- a/internal/db/db.go +++ b/internal/db/db.go @@ -48,15 +48,6 @@ type DB interface { USEFUL CONVERSION FUNCTIONS */ - // MentionStringsToMentions takes a slice of deduplicated, lowercase account names in the form "@test@whatever.example.org" for a remote account, - // or @test for a local account, which have been mentioned in a status. - // It takes the id of the account that wrote the status, and the id of the status itself, and then - // checks in the database for the mentioned accounts, and returns a slice of mentions generated based on the given parameters. - // - // Note: this func doesn't/shouldn't do any manipulation of the accounts in the DB, it's just for checking - // if they exist in the db and conveniently returning them if they do. - MentionStringsToMentions(ctx context.Context, targetAccounts []string, originAccountID string, statusID string) ([]*gtsmodel.Mention, error) - // TagStringsToTags takes a slice of deduplicated, lowercase tags in the form "somehashtag", which have been // used in a status. It takes the id of the account that wrote the status, and the id of the status itself, and then // returns a slice of *model.Tag corresponding to the given tags. If the tag already exists in database, that tag -- cgit v1.2.3