Clean up 'activitypub' references
This commit is contained in:
parent
fa945667f4
commit
4393c41426
@ -8,7 +8,7 @@ function handle_outbox( $actor, $activity ) {
|
||||
if ( !array_key_exists( 'object', $activity ) ) {
|
||||
return new \WP_Error(
|
||||
'invalid_activity',
|
||||
__( 'Expected an object', 'activitypub' ),
|
||||
__( 'Expected an object', 'pterotype' ),
|
||||
array( 'status' => 400 )
|
||||
);
|
||||
}
|
||||
|
@ -14,17 +14,17 @@ Returns either the modified $activity or a WP_Error.
|
||||
function handle_outbox( $actor_slug, $activity ) {
|
||||
if ( !(array_key_exists( 'type', $activity ) && $activity['type'] === 'Create') ) {
|
||||
return new \WP_Error(
|
||||
'invalid_activity', __( 'Expecting a Create activity', 'activitypub' )
|
||||
'invalid_activity', __( 'Expecting a Create activity', 'pterotype' )
|
||||
);
|
||||
}
|
||||
if ( !array_key_exists( 'object', $activity ) ) {
|
||||
return new \WP_Error(
|
||||
'invalid_object', __( 'Expecting an object', 'activitypub' )
|
||||
'invalid_object', __( 'Expecting an object', 'pterotype' )
|
||||
);
|
||||
}
|
||||
if ( !array_key_exists( 'actor', $activity ) ) {
|
||||
return new \WP_Error(
|
||||
'invalid_actor', __( 'Expecting a valid actor', 'activitypub' )
|
||||
'invalid_actor', __( 'Expecting a valid actor', 'pterotype' )
|
||||
);
|
||||
}
|
||||
$object = $activity['object'];
|
||||
|
@ -36,7 +36,7 @@ function get_actor_from_row( $row ) {
|
||||
return get_user_actor( $user );
|
||||
case "commenter":
|
||||
return new \WP_Error(
|
||||
'not_implemented', __( 'Commenter actors not yet implemented', 'activitypub' )
|
||||
'not_implemented', __( 'Commenter actors not yet implemented', 'pterotype' )
|
||||
);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user