Weird notif issue (#248)

* start working on weird issue

* go fmt ./...

* more tests
This commit is contained in:
tobi
2021-09-27 17:42:20 +02:00
committed by GitHub
parent c7cfbe2702
commit b3fd9c39a3
4 changed files with 138 additions and 4 deletions

View File

@ -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
}