mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-12-15 05:33:02 -06:00
[chore] Refactor AP authentication, other small bits of tidying up (#1874)
This commit is contained in:
parent
433b56d2f9
commit
24fbdf2b0a
38 changed files with 1280 additions and 996 deletions
|
|
@ -39,12 +39,9 @@ func (f *federatingDB) Announce(ctx context.Context, announce vocab.ActivityStre
|
|||
l.Debug("entering Announce")
|
||||
}
|
||||
|
||||
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
|
||||
receivingAccount, _, internal := extractFromCtx(ctx)
|
||||
if internal {
|
||||
return nil // Already processed.
|
||||
}
|
||||
|
||||
boost, isNew, err := f.typeConverter.ASAnnounceToStatus(ctx, announce)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue