Loading app/Libraries/ActivityPub/Controllers/ActorController.php +18 −4 Original line number Diff line number Diff line Loading @@ -48,7 +48,10 @@ class ActorController extends Controller return $this->{$method}(...$params); } public function index(): RedirectResponse /** * @noRector ReturnTypeDeclarationRector */ public function index(): ResponseInterface { $actorObjectClass = $this->config->actorObject; $actorObject = new $actorObjectClass($this->actor); Loading @@ -60,6 +63,8 @@ class ActorController extends Controller /** * Handles incoming requests from fediverse servers * * @noRector ReturnTypeDeclarationRector */ public function inbox(): ResponseInterface { Loading Loading @@ -228,7 +233,10 @@ class ActorController extends Controller } } public function outbox(): RedirectResponse /** * @noRector ReturnTypeDeclarationRector */ public function outbox(): ResponseInterface { // get published activities by publication date $actorActivity = model('ActivityModel') Loading Loading @@ -257,7 +265,10 @@ class ActorController extends Controller ->setBody($collection->toJSON()); } public function followers(): RedirectResponse /** * @noRector ReturnTypeDeclarationRector */ public function followers(): ResponseInterface { // get followers for a specific actor $followers = model('ActorModel') Loading Loading @@ -334,7 +345,10 @@ class ActorController extends Controller ); } public function activity(string $activityId): RedirectResponse /** * @noRector ReturnTypeDeclarationRector */ public function activity(string $activityId): ResponseInterface { if ( ! ($activity = model('ActivityModel')->getActivityById($activityId)) Loading app/Libraries/ActivityPub/Core/ObjectType.php +2 −2 Original line number Diff line number Diff line Loading @@ -33,7 +33,7 @@ class ObjectType extends AbstractObject protected array $to = ['https://www.w3.org/ns/activitystreams#Public']; /** * @var string[] * @var string[]|null */ protected array $cc = []; protected ?array $cc = null; } app/Libraries/ActivityPub/Models/ActorModel.php +4 −1 Original line number Diff line number Diff line Loading @@ -84,7 +84,10 @@ class ActorModel extends Model $domain = get_current_domain(); } $cacheName = "actor-{$username}-{$domain}"; // remove colons for port if set $cacheDomain = str_replace(':', '', $domain); $cacheName = "actor-{$username}-{$cacheDomain}"; if (! ($found = cache($cacheName))) { $found = $this->where([ 'username' => $username, Loading Loading
app/Libraries/ActivityPub/Controllers/ActorController.php +18 −4 Original line number Diff line number Diff line Loading @@ -48,7 +48,10 @@ class ActorController extends Controller return $this->{$method}(...$params); } public function index(): RedirectResponse /** * @noRector ReturnTypeDeclarationRector */ public function index(): ResponseInterface { $actorObjectClass = $this->config->actorObject; $actorObject = new $actorObjectClass($this->actor); Loading @@ -60,6 +63,8 @@ class ActorController extends Controller /** * Handles incoming requests from fediverse servers * * @noRector ReturnTypeDeclarationRector */ public function inbox(): ResponseInterface { Loading Loading @@ -228,7 +233,10 @@ class ActorController extends Controller } } public function outbox(): RedirectResponse /** * @noRector ReturnTypeDeclarationRector */ public function outbox(): ResponseInterface { // get published activities by publication date $actorActivity = model('ActivityModel') Loading Loading @@ -257,7 +265,10 @@ class ActorController extends Controller ->setBody($collection->toJSON()); } public function followers(): RedirectResponse /** * @noRector ReturnTypeDeclarationRector */ public function followers(): ResponseInterface { // get followers for a specific actor $followers = model('ActorModel') Loading Loading @@ -334,7 +345,10 @@ class ActorController extends Controller ); } public function activity(string $activityId): RedirectResponse /** * @noRector ReturnTypeDeclarationRector */ public function activity(string $activityId): ResponseInterface { if ( ! ($activity = model('ActivityModel')->getActivityById($activityId)) Loading
app/Libraries/ActivityPub/Core/ObjectType.php +2 −2 Original line number Diff line number Diff line Loading @@ -33,7 +33,7 @@ class ObjectType extends AbstractObject protected array $to = ['https://www.w3.org/ns/activitystreams#Public']; /** * @var string[] * @var string[]|null */ protected array $cc = []; protected ?array $cc = null; }
app/Libraries/ActivityPub/Models/ActorModel.php +4 −1 Original line number Diff line number Diff line Loading @@ -84,7 +84,10 @@ class ActorModel extends Model $domain = get_current_domain(); } $cacheName = "actor-{$username}-{$domain}"; // remove colons for port if set $cacheDomain = str_replace(':', '', $domain); $cacheName = "actor-{$username}-{$cacheDomain}"; if (! ($found = cache($cacheName))) { $found = $this->where([ 'username' => $username, Loading