mirror of
https://github.com/writefreely/writefreely
synced 2024-11-24 17:43:05 +00:00
Merge branch 'master' of github.com:writeas/writefreely
This commit is contained in:
commit
1f973464bc
1 changed files with 11 additions and 2 deletions
13
posts.go
13
posts.go
|
@ -1023,7 +1023,10 @@ func fetchPost(app *app, w http.ResponseWriter, r *http.Request) error {
|
||||||
|
|
||||||
p.Collection = &CollectionObj{Collection: *coll}
|
p.Collection = &CollectionObj{Collection: *coll}
|
||||||
po := p.ActivityObject()
|
po := p.ActivityObject()
|
||||||
po.Context = []interface{}{activitystreams.Namespace}
|
po.Context = []interface{}{
|
||||||
|
activitystreams.Namespace,
|
||||||
|
activitystreams.Extensions,
|
||||||
|
}
|
||||||
return impart.RenderActivityJSON(w, po, http.StatusOK)
|
return impart.RenderActivityJSON(w, po, http.StatusOK)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1093,6 +1096,9 @@ func (p *PublicPost) ActivityObject() *activitystreams.Object {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
o.CommentsEnabled = false
|
||||||
|
|
||||||
return o
|
return o
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1302,7 +1308,10 @@ func viewCollectionPost(app *app, w http.ResponseWriter, r *http.Request) error
|
||||||
} else if strings.Contains(r.Header.Get("Accept"), "application/activity+json") {
|
} else if strings.Contains(r.Header.Get("Accept"), "application/activity+json") {
|
||||||
p.extractData()
|
p.extractData()
|
||||||
ap := p.ActivityObject()
|
ap := p.ActivityObject()
|
||||||
ap.Context = []interface{}{activitystreams.Namespace}
|
ap.Context = []interface{}{
|
||||||
|
activitystreams.Namespace,
|
||||||
|
activitystreams.Extensions,
|
||||||
|
}
|
||||||
return impart.RenderActivityJSON(w, ap, http.StatusOK)
|
return impart.RenderActivityJSON(w, ap, http.StatusOK)
|
||||||
} else {
|
} else {
|
||||||
p.extractData()
|
p.extractData()
|
||||||
|
|
Loading…
Reference in a new issue