Changes
3 changed files (+21/-2)
-
-
@@ -1,6 +1,9 @@package activitypub import as "github.com/go-ap/activitystreams" import ( "errors" as "github.com/go-ap/activitystreams" ) // Endpoints a json object which maps additional (typically server/domain-wide) // endpoints which may be useful either for this actor or someone referencing this actor.
-
@@ -151,3 +154,15 @@ func (a *actor)UnmarshalJSON(data []byte) error {//a.Streams = as.JSONGetItems(data, "streams") return nil } // ToObject func ToPerson(it as.Item) (*Person, error) { switch i := it.(type) { case *actor: return i, nil case actor: return &i, nil } return nil, errors.New("unable to convert object") }
-
-
-
@@ -333,3 +333,7 @@ func TestService_IsLink(t *testing.T) {func TestService_IsObject(t *testing.T) { t.Skipf("TODO") } func TestToPerson(t *testing.T) { t.Skipf("TODO") }
-
-
-
@@ -2,6 +2,6 @@ module github.com/go-ap/activitypubrequire ( github.com/buger/jsonparser v0.0.0-20181023193515-52c6e1462ebd github.com/go-ap/activitystreams v0.0.0-20190306111705-2a794fbd6a34 github.com/go-ap/activitystreams v0.0.0-20190512181306-9255f5ce5de3 github.com/go-ap/jsonld v0.0.0-20190306111347-fbb94302fe92 )
-