mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-11-16 21:17:34 -06:00
[bugfix] Refactor parse mention, fix local mention bug (#2657)
* [bugfix] Refactor parse mention, fix local mention bug * originAccount -> originAcct
This commit is contained in:
parent
b14cd645f9
commit
a314d2b539
8 changed files with 233 additions and 97 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue