summaryrefslogtreecommitdiff
path: root/internal/federation/gone.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/federation/gone.go')
-rw-r--r--internal/federation/gone.go12
1 files changed, 1 insertions, 11 deletions
diff --git a/internal/federation/gone.go b/internal/federation/gone.go
index 3d9fe3b84..e6d784181 100644
--- a/internal/federation/gone.go
+++ b/internal/federation/gone.go
@@ -2,12 +2,10 @@ package federation
import (
"context"
- "fmt"
"net/url"
"github.com/superseriousbusiness/gotosocial/internal/gtsmodel"
"github.com/superseriousbusiness/gotosocial/internal/id"
- "github.com/superseriousbusiness/gotosocial/internal/log"
)
// CheckGone checks if a tombstone exists in the database for AP Actor or Object with the given uri.
@@ -17,18 +15,10 @@ func (f *federator) CheckGone(ctx context.Context, uri *url.URL) (bool, error) {
// HandleGone puts a tombstone in the database, which marks an AP Actor or Object with the given uri as gone.
func (f *federator) HandleGone(ctx context.Context, uri *url.URL) error {
- tombstoneID, err := id.NewULID()
- if err != nil {
- err = fmt.Errorf("HandleGone: error generating id for new tombstone %s: %s", uri, err)
- log.Error(err)
- return err
- }
-
tombstone := &gtsmodel.Tombstone{
- ID: tombstoneID,
+ ID: id.NewULID(),
Domain: uri.Host,
URI: uri.String(),
}
-
return f.db.PutTombstone(ctx, tombstone)
}