|
|
|
@ -82,37 +82,38 @@ class FederationController extends Controller
|
|
|
|
{
|
|
|
|
{
|
|
|
|
$res = Cache::remember('api:nodeinfo', 60, function () {
|
|
|
|
$res = Cache::remember('api:nodeinfo', 60, function () {
|
|
|
|
return [
|
|
|
|
return [
|
|
|
|
'metadata' => [
|
|
|
|
'metadata' => [
|
|
|
|
'nodeName' => config('app.name'),
|
|
|
|
'nodeName' => config('app.name'),
|
|
|
|
'software' => [
|
|
|
|
'software' => [
|
|
|
|
'homepage' => 'https://pixelfed.org',
|
|
|
|
'homepage' => 'https://pixelfed.org',
|
|
|
|
'github' => 'https://github.com/pixelfed',
|
|
|
|
'github' => 'https://github.com/pixelfed',
|
|
|
|
'follow' => 'https://mastodon.social/@pixelfed',
|
|
|
|
'follow' => 'https://mastodon.social/@pixelfed',
|
|
|
|
],
|
|
|
|
],
|
|
|
|
],
|
|
|
|
'captcha' => (bool) config('pixelfed.recaptcha'),
|
|
|
|
'openRegistrations' => config('pixelfed.open_registration'),
|
|
|
|
],
|
|
|
|
'protocols' => [
|
|
|
|
'openRegistrations' => config('pixelfed.open_registration'),
|
|
|
|
'activitypub',
|
|
|
|
'protocols' => [
|
|
|
|
],
|
|
|
|
'activitypub',
|
|
|
|
'services' => [
|
|
|
|
],
|
|
|
|
'inbound' => [],
|
|
|
|
'services' => [
|
|
|
|
'outbound' => [],
|
|
|
|
'inbound' => [],
|
|
|
|
],
|
|
|
|
'outbound' => [],
|
|
|
|
'software' => [
|
|
|
|
],
|
|
|
|
'name' => 'pixelfed',
|
|
|
|
'software' => [
|
|
|
|
'version' => config('pixelfed.version'),
|
|
|
|
'name' => 'pixelfed',
|
|
|
|
],
|
|
|
|
'version' => config('pixelfed.version'),
|
|
|
|
'usage' => [
|
|
|
|
],
|
|
|
|
'localPosts' => \App\Status::whereLocal(true)->whereHas('media')->count(),
|
|
|
|
'usage' => [
|
|
|
|
'localComments' => \App\Status::whereLocal(true)->whereNotNull('in_reply_to_id')->count(),
|
|
|
|
'localPosts' => \App\Status::whereLocal(true)->whereHas('media')->count(),
|
|
|
|
'users' => [
|
|
|
|
'localComments' => \App\Status::whereLocal(true)->whereNotNull('in_reply_to_id')->count(),
|
|
|
|
'total' => \App\User::count(),
|
|
|
|
'users' => [
|
|
|
|
'activeHalfyear' => \App\AccountLog::select('user_id')->whereAction('auth.login')->where('updated_at', '>',Carbon::now()->subMonths(6)->toDateTimeString())->groupBy('user_id')->get()->count(),
|
|
|
|
'total' => \App\User::count(),
|
|
|
|
'activeMonth' => \App\AccountLog::select('user_id')->whereAction('auth.login')->where('updated_at', '>',Carbon::now()->subMonths(1)->toDateTimeString())->groupBy('user_id')->get()->count(),
|
|
|
|
'activeHalfyear' => \App\AccountLog::select('user_id')->whereAction('auth.login')->where('updated_at', '>',Carbon::now()->subMonths(6)->toDateTimeString())->groupBy('user_id')->get()->count(),
|
|
|
|
],
|
|
|
|
'activeMonth' => \App\AccountLog::select('user_id')->whereAction('auth.login')->where('updated_at', '>',Carbon::now()->subMonths(1)->toDateTimeString())->groupBy('user_id')->get()->count(),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
'version' => '2.0',
|
|
|
|
],
|
|
|
|
];
|
|
|
|
'version' => '2.0',
|
|
|
|
|
|
|
|
];
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
return response()->json($res, 200, [
|
|
|
|
return response()->json($res, 200, [
|
|
|
|
|