mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-10-29 16:02:25 -05:00
Weird notif issue (#248)
* start working on weird issue * go fmt ./... * more tests
This commit is contained in:
parent
c7cfbe2702
commit
b3fd9c39a3
4 changed files with 138 additions and 4 deletions
|
|
@ -190,8 +190,17 @@ func (p *processor) notifyFollow(ctx context.Context, follow *gtsmodel.Follow, t
|
|||
return nil
|
||||
}
|
||||
|
||||
func (p *processor) notifyFave(ctx context.Context, fave *gtsmodel.StatusFave, targetAccount *gtsmodel.Account) error {
|
||||
// return if this isn't a local account
|
||||
func (p *processor) notifyFave(ctx context.Context, fave *gtsmodel.StatusFave) error {
|
||||
if fave.TargetAccount == nil {
|
||||
a, err := p.db.GetAccountByID(ctx, fave.TargetAccountID)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
fave.TargetAccount = a
|
||||
}
|
||||
targetAccount := fave.TargetAccount
|
||||
|
||||
// just return if target isn't a local account
|
||||
if targetAccount.Domain != "" {
|
||||
return nil
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue