From 773792c86593f0fcbc88beec58551d6dac50e306 Mon Sep 17 00:00:00 2001 From: Dima Krasner Date: Sat, 21 Dec 2024 19:31:13 +0200 Subject: [PATCH] add Public --- outbox/undo.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/outbox/undo.go b/outbox/undo.go index b38370c..a371997 100644 --- a/outbox/undo.go +++ b/outbox/undo.go @@ -33,12 +33,15 @@ func Undo(ctx context.Context, domain string, db *sql.DB, activity *ap.Activity) return errors.New("cannot undo activity") } + to := activity.To + to.Add(ap.Public) + undo := ap.Activity{ Context: "https://www.w3.org/ns/activitystreams", ID: fmt.Sprintf("https://%s/undo/%x", domain, sha256.Sum256([]byte(fmt.Sprintf("%s|%d", activity.ID, time.Now().UnixNano())))), Type: ap.Undo, Actor: activity.Actor, - To: activity.To, + To: to, CC: activity.CC, Object: activity, }