* fix(ap): add safe constructors, getters, and validators to ActivityPub actors to address #4701 * chore: replace nil check with the new Validate() method * chore(test): added test to verify the values extracted from actors * fix: return the specific error type + test for it * fix(ap): add recovery for each AP inbox worker for a worst case scenario * fix(ap): add additional safe accessor methods to other AP entities other than actors * chore(tests): add tests for the new safe accessors * fix(ap): handle empty public keys in AP actors
18 lines
471 B
Go
18 lines
471 B
Go
package inbox
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/go-fed/activity/streams/vocab"
|
|
"github.com/owncast/owncast/activitypub/apmodels"
|
|
"github.com/pkg/errors"
|
|
)
|
|
|
|
func handleCreateRequest(c context.Context, activity vocab.ActivityStreamsCreate) error {
|
|
iri, err := apmodels.GetIRIStringFromJSONLDIdProperty(activity.GetJSONLDId())
|
|
if err != nil {
|
|
return errors.Wrap(err, "create activity is missing IRI")
|
|
}
|
|
return errors.New("not handling create request of: " + iri)
|
|
}
|