Skip to content

Commit

Permalink
add Public
Browse files Browse the repository at this point in the history
  • Loading branch information
dimkr committed Dec 21, 2024
1 parent 1fb4193 commit 773792c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion outbox/undo.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}
Expand Down

0 comments on commit 773792c

Please sign in to comment.