Fix announcements

pull/15/head
Michael Demetriou 2019-09-17 11:57:52 +03:00
parent c4594779db
commit 62d04be12e
1 changed files with 3 additions and 2 deletions

View File

@ -682,14 +682,15 @@ func (a *Actor) Unfollow(user string) {
func (a *Actor) Announce(url string) {
// our announcements are public. Public stuff have a "To" to the url below
toURL := "https://www.w3.org/ns/activitystreams#Public"
id, hash := a.newItemID()
hash, id := a.newItemID()
announce := make(map[string]interface{})
announce["@context"] = context()
announce["id"] = id
announce["type"] = "Announce"
announce["object"] = url
announce["actor"] = a.name
announce["actor"] = a.iri
announce["to"] = toURL
// cc this to all our followers one by one