Fix bugs
This commit is contained in:
parent
3c021db5f0
commit
80265024a7
@ -91,6 +91,9 @@ class apSharedInboxAction extends ManagedAction
|
|||||||
|
|
||||||
// Process request
|
// Process request
|
||||||
switch ($data->type) {
|
switch ($data->type) {
|
||||||
|
// Data available:
|
||||||
|
// Profile $actor_profile
|
||||||
|
// string|object $data->object
|
||||||
case "Create":
|
case "Create":
|
||||||
require_once __DIR__ . DIRECTORY_SEPARATOR . "inbox" . DIRECTORY_SEPARATOR . "Create.php";
|
require_once __DIR__ . DIRECTORY_SEPARATOR . "inbox" . DIRECTORY_SEPARATOR . "Create.php";
|
||||||
break;
|
break;
|
||||||
|
@ -30,8 +30,12 @@ if (!defined('GNUSOCIAL')) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
if (isset($data->object->id)) {
|
||||||
ActivityPubPlugin::get_local_notice_from_url($data->object->id)->repeat($actor_profile, "ActivityPub");
|
ActivityPubPlugin::get_local_notice_from_url($data->object->id)->repeat($actor_profile, "ActivityPub");
|
||||||
ActivityPubReturn::answer("Notice repeated successfully.");
|
ActivityPubReturn::answer("Notice repeated successfully.");
|
||||||
|
} else {
|
||||||
|
ActivityPubReturn::error('No object id was specified.');
|
||||||
|
}
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
ActivityPubReturn::error($e->getMessage(), 403);
|
ActivityPubReturn::error($e->getMessage(), 403);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user