}
// When the photo is too large, try to shorten it by removing parts
- if (strlen($apcontact['photo'] ?? '') > 255) {
+ if (strlen($apcontact['photo'] ?? '') > 383) {
$parts = parse_url($apcontact['photo']);
unset($parts['fragment']);
$apcontact['photo'] = (string)Uri::fromParts((array)$parts);
- if (strlen($apcontact['photo']) > 255) {
+ if (strlen($apcontact['photo']) > 383) {
unset($parts['query']);
$apcontact['photo'] = (string)Uri::fromParts((array)$parts);
}
- if (strlen($apcontact['photo']) > 255) {
- $apcontact['photo'] = substr($apcontact['photo'], 0, 255);
+ if (strlen($apcontact['photo']) > 383) {
+ $apcontact['photo'] = substr($apcontact['photo'], 0, 383);
}
}
namespace Friendica\Module\ActivityPub;
-use Friendica\Core\System;
use Friendica\Model\User;
use Friendica\Module\BaseApi;
use Friendica\Protocol\ActivityPub;
protected function rawContent(array $request = [])
{
if (empty($this->parameters['nickname'])) {
- throw new \Friendica\Network\HTTPException\NotFoundException();
+ $this->jsonExit([], 'application/activity+json');
}
$owner = User::getOwnerDataByNick($this->parameters['nickname']);
'/following/{nickname}' => [Module\ActivityPub\Following::class, [R::GET]],
'/friendica[/{format:json}]' => [Module\Friendica::class, [R::GET]],
'/friendica/inbox' => [Module\ActivityPub\Inbox::class, [R::GET, R::POST]],
+ '/friendica/outbox' => [Module\ActivityPub\Outbox::class, [R::GET]],
'/fsuggest/{contact:\d+}' => [Module\FriendSuggest::class, [R::GET, R::POST]],