[bugfix] Refactor parse mention, fix local mention bug (#2657)

* [bugfix] Refactor parse mention, fix local mention bug

* originAccount -> originAcct
This commit is contained in:
tobi 2024-02-19 04:48:20 +01:00 committed by GitHub
commit a314d2b539
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 233 additions and 97 deletions

View file

@ -60,7 +60,7 @@ type Mention struct {
// A pointer to the gtsmodel account of the mentioned account.
}
// ParseMentionFunc describes a function that takes a lowercase account name
// ParseMentionFunc describes a function that takes a lowercase account namestring
// in the form "@test@whatever.example.org" for a remote account, or "@test"
// for a local account, and returns a fully populated mention for that account,
// with the given origin status ID and origin account ID.
@ -70,4 +70,4 @@ type Mention struct {
//
// Mentions generated by this function are not put in the database, that's still up to
// the caller to do.
type ParseMentionFunc func(ctx context.Context, targetAccount string, originAccountID string, statusID string) (*Mention, error)
type ParseMentionFunc func(ctx context.Context, namestring string, originAccountID string, statusID string) (*Mention, error)