diff options
Diffstat (limited to 'internal/federation/federatingdb/delete.go')
-rw-r--r-- | internal/federation/federatingdb/delete.go | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/internal/federation/federatingdb/delete.go b/internal/federation/federatingdb/delete.go index fc77f8025..77c3f502b 100644 --- a/internal/federation/federatingdb/delete.go +++ b/internal/federation/federatingdb/delete.go @@ -44,12 +44,9 @@ func (f *federatingDB) Delete(ctx context.Context, id *url.URL) error { ) l.Debug("entering Delete") - targetAcct, fromFederatorChan, err := extractFromCtx(ctx) - if err != nil { - return err - } - if targetAcct == nil || fromFederatorChan == nil { - // If the target account or federator channel wasn't set on the context, that means this request didn't pass + receivingAccount, _, fromFederatorChan := extractFromCtx(ctx) + if receivingAccount == nil || fromFederatorChan == nil { + // If the receiving account or federator channel wasn't set on the context, that means this request didn't pass // through the API, but came from inside GtS as the result of another activity on this instance. That being so, // we can safely just ignore this activity, since we know we've already processed it elsewhere. return nil @@ -68,7 +65,7 @@ func (f *federatingDB) Delete(ctx context.Context, id *url.URL) error { APObjectType: ap.ObjectNote, APActivityType: ap.ActivityDelete, GTSModel: s, - ReceivingAccount: targetAcct, + ReceivingAccount: receivingAccount, } } @@ -80,7 +77,7 @@ func (f *federatingDB) Delete(ctx context.Context, id *url.URL) error { APObjectType: ap.ObjectProfile, APActivityType: ap.ActivityDelete, GTSModel: a, - ReceivingAccount: targetAcct, + ReceivingAccount: receivingAccount, } } |