From 4e415f7257c5479bc86cc6be2e19d10369eae5e5 Mon Sep 17 00:00:00 2001 From: Gabe Kangas Date: Fri, 18 Mar 2022 13:01:11 -0700 Subject: [PATCH] CC->TO because Mastodon cares for visibility --- activitypub/apmodels/activity.go | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/activitypub/apmodels/activity.go b/activitypub/apmodels/activity.go index b4c9b5947..730419610 100644 --- a/activitypub/apmodels/activity.go +++ b/activitypub/apmodels/activity.go @@ -24,9 +24,10 @@ func MakeCreateActivity(activityID *url.URL) vocab.ActivityStreamsCreate { id.Set(activityID) activity.SetJSONLDId(id) - // CC the public if we're not treating ActivityPub as "private". + // TO the public if we're not treating ActivityPub as "private". if !data.GetFederationIsPrivate() { public, _ := url.Parse(PUBLIC) + to := streams.NewActivityStreamsToProperty() to.AppendIRI(public) activity.SetActivityStreamsTo(to) @@ -76,12 +77,16 @@ func MakeNote(text string, noteIRI *url.URL, attributedToIRI *url.URL) vocab.Act attr.AppendIRI(attributedTo) note.SetActivityStreamsAttributedTo(attr) - // CC the public if we're not treating ActivityPub as "private". + // To the public if we're not treating ActivityPub as "private". if !data.GetFederationIsPrivate() { public, _ := url.Parse(PUBLIC) - cc := streams.NewActivityStreamsCcProperty() - cc.AppendIRI(public) - note.SetActivityStreamsCc(cc) + to := streams.NewActivityStreamsToProperty() + to.AppendIRI(public) + note.SetActivityStreamsTo(to) + + audience := streams.NewActivityStreamsAudienceProperty() + audience.AppendIRI(public) + note.SetActivityStreamsAudience(audience) } return note