diff --git a/outbox/unfollow.go b/outbox/unfollow.go index 90c9620e..3e2ea931 100644 --- a/outbox/unfollow.go +++ b/outbox/unfollow.go @@ -26,6 +26,7 @@ import ( "github.com/dimkr/tootik/ap" "github.com/dimkr/tootik/cfg" "log/slog" + "time" ) func Unfollow(ctx context.Context, log *slog.Logger, db *sql.DB, follower *ap.Actor, followed, followID string) error { @@ -33,7 +34,7 @@ func Unfollow(ctx context.Context, log *slog.Logger, db *sql.DB, follower *ap.Ac return fmt.Errorf("%s cannot unfollow %s", follower.ID, followed) } - undoID := fmt.Sprintf("https://%s/undo/%x", cfg.Domain, sha256.Sum256([]byte(fmt.Sprintf("%s|%s", follower.ID, followed)))) + undoID := fmt.Sprintf("https://%s/undo/%x", cfg.Domain, sha256.Sum256([]byte(fmt.Sprintf("%s|%s|%d", follower.ID, followed, time.Now().UnixNano())))) to := ap.Audience{} to.Add(followed)