Announce article if it contains "inReplyTo"
This commit is contained in:
parent
0db4c4f6b6
commit
447ce3702c
12
actor.go
12
actor.go
|
@ -139,6 +139,18 @@ func (a *Actor) PostArticle(url string) error {
|
||||||
}
|
}
|
||||||
create["object"] = article
|
create["object"] = article
|
||||||
go a.sendToFollowers(create)
|
go a.sendToFollowers(create)
|
||||||
|
if article["inReplyTo"] != nil {
|
||||||
|
// Boost article if it contains "inReplyTo"
|
||||||
|
announce := make(map[string]interface{})
|
||||||
|
announce["@context"] = context()
|
||||||
|
announce["id"] = url + "#Announce"
|
||||||
|
announce["type"] = "Announce"
|
||||||
|
announce["object"] = url
|
||||||
|
announce["actor"] = a.iri
|
||||||
|
announce["to"] = []string{"https://www.w3.org/ns/activitystreams#Public"}
|
||||||
|
announce["published"] = article["published"]
|
||||||
|
go a.sendToFollowers(announce)
|
||||||
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Reference in New Issue