summaryrefslogtreecommitdiff
path: root/internal/federation/federatingdb/accept.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/federation/federatingdb/accept.go')
-rw-r--r--internal/federation/federatingdb/accept.go14
1 files changed, 7 insertions, 7 deletions
diff --git a/internal/federation/federatingdb/accept.go b/internal/federation/federatingdb/accept.go
index 25dd2bce0..f22db38a5 100644
--- a/internal/federation/federatingdb/accept.go
+++ b/internal/federation/federatingdb/accept.go
@@ -48,9 +48,9 @@ func (f *federatingDB) Accept(ctx context.Context, accept vocab.ActivityStreamsA
l.Debug("entering Accept")
}
- 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
+ receivingAccount, _ := extractFromCtx(ctx)
+ if receivingAccount == nil {
+ // If the receiving account 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
@@ -82,12 +82,12 @@ func (f *federatingDB) Accept(ctx context.Context, accept vocab.ActivityStreamsA
return err
}
- fromFederatorChan <- messages.FromFederator{
+ f.fedWorker.Queue(messages.FromFederator{
APObjectType: ap.ActivityFollow,
APActivityType: ap.ActivityAccept,
GTSModel: follow,
ReceivingAccount: receivingAccount,
- }
+ })
return nil
}
@@ -117,12 +117,12 @@ func (f *federatingDB) Accept(ctx context.Context, accept vocab.ActivityStreamsA
return err
}
- fromFederatorChan <- messages.FromFederator{
+ f.fedWorker.Queue(messages.FromFederator{
APObjectType: ap.ActivityFollow,
APActivityType: ap.ActivityAccept,
GTSModel: follow,
ReceivingAccount: receivingAccount,
- }
+ })
return nil
}