keep a cache of activity IDs we have handled creates for

This commit is contained in:
kim 2025-01-15 16:00:25 +00:00
commit 2aee3a2605
5 changed files with 15 additions and 9 deletions

View file

@ -63,6 +63,10 @@ func (f *federatingDB) Create(ctx context.Context, asType vocab.Type) error {
return nil
}
// Cache entry for this create activity ID for later
// checks in the Exist() function if we see it again.
f.createdIDs.Set(ap.GetJSONLDId(asType).String(), struct{}{})
switch name := asType.GetTypeName(); name {
case ap.ActivityBlock:
// BLOCK SOMETHING