use Friendica\Module;
$profileRoutes = [
- '' => [Module\Profile\Index::class, [R::GET]],
- '/attachment/upload' => [Module\Profile\Attachment\Upload::class, [ R::POST]],
- '/contacts/common' => [Module\Profile\Common::class, [R::GET]],
- '/contacts[/{type}]' => [Module\Profile\Contacts::class, [R::GET]],
- '/media' => [Module\Profile\Media::class, [R::GET]],
- '/photos/upload' => [Module\Profile\Photos\Upload::class, [ R::POST]],
- '/profile' => [Module\Profile\Profile::class, [R::GET]],
- '/remote_follow' => [Module\Profile\RemoteFollow::class, [R::GET, R::POST]],
- '/schedule' => [Module\Profile\Schedule::class, [R::GET, R::POST]],
- '/status[/{category}[/{date1}[/{date2}]]]' => [Module\Profile\Status::class, [R::GET]],
- '/unkmail' => [Module\Profile\UnkMail::class, [R::GET, R::POST]],
+ '' => [Module\Profile\Index::class, [R::GET]],
+ '/contacts/common' => [Module\Profile\Common::class, [R::GET]],
+ '/contacts[/{type}]' => [Module\Profile\Contacts::class, [R::GET]],
+ '/media' => [Module\Profile\Media::class, [R::GET]],
+ '/photos' => [Module\Profile\Photos::class, [R::GET ]],
+ '/profile' => [Module\Profile\Profile::class, [R::GET]],
+ '/remote_follow' => [Module\Profile\RemoteFollow::class, [R::GET, R::POST]],
+ '/schedule' => [Module\Profile\Schedule::class, [R::GET, R::POST]],
+ '/status[/{category}[/{date1}[/{date2}]]]' => [Module\Profile\Status::class, [R::GET]],
+ '/unkmail' => [Module\Profile\UnkMail::class, [R::GET, R::POST]],
];
$apiRoutes = [
'/statuses/{id:\d+}/pin' => [Module\Api\Mastodon\Statuses\Pin::class, [ R::POST]],
'/statuses/{id:\d+}/unpin' => [Module\Api\Mastodon\Statuses\Unpin::class, [ R::POST]],
'/statuses/{id:\d+}/history' => [Module\Api\Mastodon\Unimplemented::class, [R::GET ]], // not implemented
- '/statuses/{id:\d+}/source' => [Module\Api\Mastodon\Unimplemented::class, [R::GET ]], // not implemented
+ '/statuses/{id:\d+}/source' => [Module\Api\Mastodon\Statuses\Source::class, [R::GET ]],
'/streaming/direct' => [Module\Api\Mastodon\Unimplemented::class, [R::GET ]], // not implemented
'/streaming/hashtag' => [Module\Api\Mastodon\Unimplemented::class, [R::GET ]], // not implemented
'/streaming/hashtag/local' => [Module\Api\Mastodon\Unimplemented::class, [R::GET ]], // not implemented
'/acctlink' => [Module\Acctlink::class, [R::GET]],
'/apps' => [Module\Apps::class, [R::GET]],
'/attach/{item:\d+}' => [Module\Attach::class, [R::GET]],
+
+ // Mastodon route used by Fedifind to follow people who set their Webfinger address in their Twitter bio
+ '/authorize_interaction' => [Module\Contact\Follow::class, [R::GET, R::POST]],
+
'/babel' => [Module\Debug\Babel::class, [R::GET, R::POST]],
'/debug/ap' => [Module\Debug\ActivityPubConversion::class, [R::GET, R::POST]],
'/magic' => [Module\Magic::class, [R::GET]],
'/manifest' => [Module\Manifest::class, [R::GET]],
'/friendica.webmanifest' => [Module\Manifest::class, [R::GET]],
+
+ '/media' => [
+ '/attachment/browser' => [Module\Media\Attachment\Browser::class, [R::GET]],
+ '/attachment/upload' => [Module\Media\Attachment\Upload::class, [ R::POST]],
+ '/photo/browser[/{album}]' => [Module\Media\Photo\Browser::class, [R::GET]],
+ '/photo/upload' => [Module\Media\Photo\Upload::class, [ R::POST]],
+ ],
+
'/moderation' => [
'[/]' => [Module\Moderation\Summary::class, [R::GET]],
'/{type}/{customsize:\d+}/{nickname_ext}' => [Module\Photo::class, [R::GET]],
],
+ // Kept for backwards-compatibility
+ // @TODO remove by version 2023.12
+ '/photos/{nickname}' => [Module\Profile\Photos::class, [R::GET]],
+
'/ping' => [Module\Notifications\Ping::class, [R::GET]],
'/post' => [
+ '/{post_id}/edit' => [Module\Post\Edit::class, [R::GET ]],
'/{post_id}/share' => [Module\Post\Share::class, [R::GET ]],
'/{item_id}/tag/add' => [Module\Post\Tag\Add::class, [ R::POST]],
'/{item_id}/tag/remove[/{tag_name}]' => [Module\Post\Tag\Remove::class, [R::GET, R::POST]],
'/update_community[/{content}]' => [Module\Update\Community::class, [R::GET]],
- '/update_display[/]' => [Module\Update\Display::class, [R::GET]],
+ '/update_display' => [Module\Update\Display::class, [R::GET]],
'/update_network' => [
'[/]' => [Module\Update\Network::class, [R::GET]],