diff --git a/activitystreams/activity.go b/activitystreams/activity.go index 4eafa80..b1a5340 100644 --- a/activitystreams/activity.go +++ b/activitystreams/activity.go @@ -20,7 +20,7 @@ type Activity struct { func NewCreateActivity(o *Object) *Activity { a := Activity{ BaseObject: BaseObject{ - Context: []string{ + Context: []interface{}{ "https://www.w3.org/ns/activitystreams", }, ID: o.ID + "/activity", diff --git a/activitystreams/data.go b/activitystreams/data.go index 7c26588..d01d486 100644 --- a/activitystreams/data.go +++ b/activitystreams/data.go @@ -4,9 +4,9 @@ import "fmt" type ( BaseObject struct { - Context []string `json:"@context,omitempty"` - Type string `json:"type"` - ID string `json:"id"` + Context []interface{} `json:"@context,omitempty"` + Type string `json:"type"` + ID string `json:"id"` } PublicKey struct { @@ -33,7 +33,7 @@ type OrderedCollection struct { func NewOrderedCollection(accountRoot, collType string, items int) *OrderedCollection { oc := OrderedCollection{ BaseObject: BaseObject{ - Context: []string{ + Context: []interface{}{ "https://www.w3.org/ns/activitystreams", }, ID: accountRoot + "/" + collType, @@ -57,7 +57,7 @@ type OrderedCollectionPage struct { func NewOrderedCollectionPage(accountRoot, collType string, items, page int) *OrderedCollectionPage { ocp := OrderedCollectionPage{ BaseObject: BaseObject{ - Context: []string{ + Context: []interface{}{ "https://www.w3.org/ns/activitystreams", }, ID: fmt.Sprintf("%s/%s?page=%d", accountRoot, collType, page), diff --git a/activitystreams/person.go b/activitystreams/person.go index 57daa0f..3b43279 100644 --- a/activitystreams/person.go +++ b/activitystreams/person.go @@ -18,7 +18,7 @@ func NewPerson(accountRoot string) *Person { p := Person{ BaseObject: BaseObject{ Type: "Person", - Context: []string{ + Context: []interface{}{ "https://www.w3.org/ns/activitystreams", }, ID: accountRoot,