-
Notifications
You must be signed in to change notification settings - Fork 2
/
extend.php
25 lines (22 loc) · 934 Bytes
/
extend.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<?php
namespace Squeevee\Feddle;
use Flarum\Extend;
use Flarum\Frontend\Document;
use Flarum\Foundation\Application;
use Flarum\Event\ConfigureMiddleware;
use Illuminate\Contracts\Events\Dispatcher;
return [
(new Extend\Frontend('forum'))
->js(__DIR__.'/js/dist/forum.js'),
(new Extend\Locales(__DIR__ . '/resources/locales') ),
(new Extend\Routes('api'))
->get('/feddle/outbox', 'feddle.outbox', Controllers\ActivityPubControllerAdapter::class),
(new Extend\Routes('api'))
->post('/feddle/inbox', 'feddle.inbox', Controllers\ActivityPubControllerAdapter::class),
(new Extend\Routes('forum'))
->get('/@{username}[/{filter:[^/]*}]', 'feddle.user', Controllers\UserRouteController::class),
function (Dispatcher $events, Application $app) {
$app->register(ActivityPub\ActivityPubProvider::class);
$events->subscribe(Listeners\MiddlewareListener::class);
}
];