blob: cd34b6ca0f8b478c3a29f4439ef98e99faa581d3 (
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 RenderActivity(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.NewActivityStreamsCreate()
crea.SetActivityStreamsTo(toProp)
return streams.Serialize(crea)
}
|