Make "Announce" "To" property an array according to
https://git.pleroma.social/pleroma/pleroma/issues/1326#note_43069pull/15/head
parent
6ca250bcf4
commit
5bbc0fca4c
7
actor.go
7
actor.go
|
@ -719,7 +719,7 @@ func (a *Actor) Unfollow(user string) {
|
||||||
// Announce this activity to our followers
|
// Announce this activity to our followers
|
||||||
func (a *Actor) Announce(url string) {
|
func (a *Actor) Announce(url string) {
|
||||||
// our announcements are public. Public stuff have a "To" to the url below
|
// our announcements are public. Public stuff have a "To" to the url below
|
||||||
toURL := "https://www.w3.org/ns/activitystreams#Public"
|
toURL := []string{"https://www.w3.org/ns/activitystreams#Public"}
|
||||||
hash, id := a.newItemID()
|
hash, id := a.newItemID()
|
||||||
|
|
||||||
announce := make(map[string]interface{})
|
announce := make(map[string]interface{})
|
||||||
|
@ -748,7 +748,8 @@ func (a *Actor) Announce(url string) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (a *Actor) followersSlice() []string {
|
func (a *Actor) followersSlice() []string {
|
||||||
followersSlice := make([]string, len(a.followers))
|
followersSlice := make([]string, 0)
|
||||||
|
followersSlice = append(followersSlice, a.followersIRI)
|
||||||
for k := range a.followers {
|
for k := range a.followers {
|
||||||
followersSlice = append(followersSlice, k)
|
followersSlice = append(followersSlice, k)
|
||||||
}
|
}
|
||||||
|
@ -784,7 +785,7 @@ func (a *Actor) Accept(follow map[string]interface{}) {
|
||||||
|
|
||||||
accept["@context"] = "https://www.w3.org/ns/activitystreams"
|
accept["@context"] = "https://www.w3.org/ns/activitystreams"
|
||||||
accept["to"] = follow["actor"]
|
accept["to"] = follow["actor"]
|
||||||
accept["id"], _ = a.newID()
|
_, accept["id"] = a.newID()
|
||||||
accept["actor"] = a.iri
|
accept["actor"] = a.iri
|
||||||
accept["object"] = follow
|
accept["object"] = follow
|
||||||
accept["type"] = "Accept"
|
accept["type"] = "Accept"
|
||||||
|
|
Loading…
Reference in New Issue