blob: 6d354ed683ece5806f43f17b93e8ec1c1b3f5c25 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
package views
import (
"net/url"
"git.capotej.com/capotej/communique/models"
"github.com/go-fed/activity/streams"
)
func RenderNote(name, domain string, item models.OutboxItem) (map[string]interface{}, error) {
publicUrl, err := url.Parse("https://www.w3.org/ns/activitystreams#Public")
if err != nil {
return nil, err
}
toProp := streams.NewActivityStreamsToProperty()
toProp.AppendIRI(publicUrl)
crea := streams.NewActivityStreamsNote()
crea.SetActivityStreamsTo(toProp)
return streams.Serialize(crea)
}
|