diff options
author | 2021-09-27 17:42:20 +0200 | |
---|---|---|
committer | 2021-09-27 17:42:20 +0200 | |
commit | b3fd9c39a3a6ecdac87b27684e7dbc54ce19b312 (patch) | |
tree | ecd482e18eb6131d07a092949556fec623ec2ec7 /internal/processing/fromcommon.go | |
parent | Unblock fix (#247) (diff) | |
download | gotosocial-b3fd9c39a3a6ecdac87b27684e7dbc54ce19b312.tar.xz |
Weird notif issue (#248)
* start working on weird issue
* go fmt ./...
* more tests
Diffstat (limited to 'internal/processing/fromcommon.go')
-rw-r--r-- | internal/processing/fromcommon.go | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/internal/processing/fromcommon.go b/internal/processing/fromcommon.go index 613ad5fca..88d7405a8 100644 --- a/internal/processing/fromcommon.go +++ b/internal/processing/fromcommon.go @@ -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 } |