mirror of
https://github.com/owncast/owncast.git
synced 2024-11-21 20:28:15 +03:00
CC->TO because Mastodon cares for visibility
This commit is contained in:
parent
c885d150d4
commit
4e415f7257
1 changed files with 10 additions and 5 deletions
|
@ -24,9 +24,10 @@ func MakeCreateActivity(activityID *url.URL) vocab.ActivityStreamsCreate {
|
||||||
id.Set(activityID)
|
id.Set(activityID)
|
||||||
activity.SetJSONLDId(id)
|
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() {
|
if !data.GetFederationIsPrivate() {
|
||||||
public, _ := url.Parse(PUBLIC)
|
public, _ := url.Parse(PUBLIC)
|
||||||
|
|
||||||
to := streams.NewActivityStreamsToProperty()
|
to := streams.NewActivityStreamsToProperty()
|
||||||
to.AppendIRI(public)
|
to.AppendIRI(public)
|
||||||
activity.SetActivityStreamsTo(to)
|
activity.SetActivityStreamsTo(to)
|
||||||
|
@ -76,12 +77,16 @@ func MakeNote(text string, noteIRI *url.URL, attributedToIRI *url.URL) vocab.Act
|
||||||
attr.AppendIRI(attributedTo)
|
attr.AppendIRI(attributedTo)
|
||||||
note.SetActivityStreamsAttributedTo(attr)
|
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() {
|
if !data.GetFederationIsPrivate() {
|
||||||
public, _ := url.Parse(PUBLIC)
|
public, _ := url.Parse(PUBLIC)
|
||||||
cc := streams.NewActivityStreamsCcProperty()
|
to := streams.NewActivityStreamsToProperty()
|
||||||
cc.AppendIRI(public)
|
to.AppendIRI(public)
|
||||||
note.SetActivityStreamsCc(cc)
|
note.SetActivityStreamsTo(to)
|
||||||
|
|
||||||
|
audience := streams.NewActivityStreamsAudienceProperty()
|
||||||
|
audience.AppendIRI(public)
|
||||||
|
note.SetActivityStreamsAudience(audience)
|
||||||
}
|
}
|
||||||
|
|
||||||
return note
|
return note
|
||||||
|
|
Loading…
Reference in a new issue