From 397127143a36251bad9bdc782c7224ecffad4c35 Mon Sep 17 00:00:00 2001 From: okpierre <1679025+okpierre@users.noreply.github.com> Date: Tue, 1 Oct 2019 01:24:12 -0400 Subject: [PATCH 01/19] Update footer.blade.php Fix to allow translation https://github.com/pixelfed/pixelfed/issues/1737 --- resources/views/layouts/partial/footer.blade.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/views/layouts/partial/footer.blade.php b/resources/views/layouts/partial/footer.blade.php index 9206380a1..475641945 100644 --- a/resources/views/layouts/partial/footer.blade.php +++ b/resources/views/layouts/partial/footer.blade.php @@ -8,7 +8,7 @@ {{__('site.help')}} {{__('site.terms')}} {{__('site.privacy')}} - Places + {{__('site.places')}} {{__('site.language')}} Powered by Pixelfed

From 0bb1887da9b4e770bbd3aa0f348d71593c6623f1 Mon Sep 17 00:00:00 2001 From: okpierre <1679025+okpierre@users.noreply.github.com> Date: Tue, 1 Oct 2019 01:25:26 -0400 Subject: [PATCH 02/19] Update site.php https://github.com/pixelfed/pixelfed/issues/1737 --- resources/lang/en/site.php | 1 + 1 file changed, 1 insertion(+) diff --git a/resources/lang/en/site.php b/resources/lang/en/site.php index f28f57459..e6a2cbfe4 100644 --- a/resources/lang/en/site.php +++ b/resources/lang/en/site.php @@ -14,5 +14,6 @@ return [ 'selectLocale' => 'Select one of the supported languages', 'contact' => 'Contact', 'contact-us' => 'Contact Us', + 'places' => 'Places', ]; From 12d913860f3c0779f220378b25348957593bd7b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anton=20Str=C3=B6mkvist?= Date: Tue, 1 Oct 2019 13:55:11 +0200 Subject: [PATCH 03/19] Translate navmenu.php to Swedish --- resources/lang/sv/navmenu.php | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 resources/lang/sv/navmenu.php diff --git a/resources/lang/sv/navmenu.php b/resources/lang/sv/navmenu.php new file mode 100644 index 000000000..1a0a4a3e8 --- /dev/null +++ b/resources/lang/sv/navmenu.php @@ -0,0 +1,20 @@ + 'Sök', + 'home' => 'Hem', + 'local' => 'Lokal', + 'network' => 'Nätverk', + 'discover' => 'Upptäck', + 'viewMyProfile' => 'Se min profil', + 'myProfile' => 'Min Profil', + 'myTimeline' => 'Min Tidslinje', + 'publicTimeline' => 'Publik Tidslinje', + 'remoteFollow' => 'Remote-följ', + 'settings' => 'Inställningar', + 'admin' => 'Admin', + 'logout' => 'Logga ut', + 'directMessages' => 'Meddelanden', + +]; From e4ee904bada5d2c9c1f33d8a2935c95385f0be96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anton=20Str=C3=B6mkvist?= Date: Tue, 1 Oct 2019 14:00:15 +0200 Subject: [PATCH 04/19] Translate helpcenter.php to Swedish --- resources/lang/sv/helpcenter.php | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 resources/lang/sv/helpcenter.php diff --git a/resources/lang/sv/helpcenter.php b/resources/lang/sv/helpcenter.php new file mode 100644 index 000000000..a09500654 --- /dev/null +++ b/resources/lang/sv/helpcenter.php @@ -0,0 +1,26 @@ + 'Hjälpcenter', + 'whatsnew' => 'Vad är nytt', + + 'gettingStarted' => 'Komma igång', + 'sharingMedia' => 'Sharing Media', + 'profile' => 'Profil', + 'stories' => 'Stories', + 'hashtags' => 'Hashtags', + 'discover' => 'Upptäck', + 'directMessages' => 'Direktmeddelanden', + 'timelines' => 'Tidslinjer', + 'embed' => 'Bädda in', + + 'communityGuidelines' => 'Riktlinjer för communityt', + 'whatIsTheFediverse' => 'Vad är fediversumet?', + 'controllingVisibility' => 'Kontrollera synlighet', + 'blockingAccounts' => 'Blocka konton', + 'safetyTips' => 'Säkerhetstips', + 'reportSomething' => 'Rapportera någonting', + 'dataPolicy' => 'Datapolicy' + +]; From 3480b64f0a01c83adbd6e471aa579b9327dc6c16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anton=20Str=C3=B6mkvist?= Date: Tue, 1 Oct 2019 14:02:51 +0200 Subject: [PATCH 05/19] Translate site.php to Swedish --- resources/lang/sv/site.php | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 resources/lang/sv/site.php diff --git a/resources/lang/sv/site.php b/resources/lang/sv/site.php new file mode 100644 index 000000000..212115fcb --- /dev/null +++ b/resources/lang/sv/site.php @@ -0,0 +1,18 @@ + 'Om', + 'help' => 'Hjälp', + 'language' => 'Språk', + 'fediverse' => 'Fediversum', + 'opensource' => 'Öppen källkod', + 'terms' => 'Villkor', + 'privacy' => 'Integritet', + 'l10nWip' => 'Vi jobbar fortfarande med lokalisering', + 'currentLocale' => 'Nuvarande locale', + 'selectLocale' => 'Välj ett av de språk som stöds', + 'contact' => 'Kontakt', + 'contact-us' => 'Kontakta oss', + +]; From aa914e6f628577f9200d910d771cde628d48abfd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anton=20Str=C3=B6mkvist?= Date: Tue, 1 Oct 2019 14:09:12 +0200 Subject: [PATCH 06/19] Translate notification.php to Swedish Translate new strings --- resources/lang/sv/notification.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/resources/lang/sv/notification.php b/resources/lang/sv/notification.php index 36da5c263..6b8f2870f 100644 --- a/resources/lang/sv/notification.php +++ b/resources/lang/sv/notification.php @@ -3,6 +3,10 @@ return [ 'likedPhoto' => 'gillade ditt foto.', + 'likedComment' => 'gillade din kommentar.', 'startedFollowingYou' => 'började följa dig.', + 'commented' => 'kommenterade ditt foto.', + 'mentionedYou' => 'nämnde dig.', + 'shared' => 'delade ditt foto.', ]; From 72a47f698bd874639055405339f7a83c4990c51f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anton=20Str=C3=B6mkvist?= Date: Tue, 1 Oct 2019 14:12:11 +0200 Subject: [PATCH 07/19] Translate profile.php to Swedish Translate new strings --- resources/lang/sv/profile.php | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/resources/lang/sv/profile.php b/resources/lang/sv/profile.php index 26891208c..a4cce9e34 100644 --- a/resources/lang/sv/profile.php +++ b/resources/lang/sv/profile.php @@ -1,8 +1,16 @@ 'Den här användaren har inga inlägg än!', - 'emptyFollowers' => 'Den här användaren har inga följare än!', - 'emptyFollowing' => 'Den här användaren följer inte någon än!', - 'savedWarning' => 'Du är den enda som kan se vad du har sparat', + 'emptyTimeline' => 'Den här användaren har inga inlägg än!', + 'emptyFollowers' => 'Den här användaren har inga följare än!', + 'emptyFollowing' => 'Den här användaren följer inte någon än!', + 'emptySaved' => 'Du har inte sparat några inlägg än!', + 'savedWarning' => 'Du är den enda som kan se vad du har sparat', + 'privateProfileWarning' => 'Det här kontot är privat', + 'alreadyFollow' => 'Följer du redan :username?', + 'loginToSeeProfile' => 'för att se hens foton och videos.', + + 'status.disabled.header' => 'Profilen är otillgänglig', + 'status.disabled.body' => 'Förlåt, men den här profilen är otillgänglig just nu. Försök igen om en stund.', + ]; From 579f6ffd03a9d004db10ba481f8cd2469d513914 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anton=20Str=C3=B6mkvist?= Date: Tue, 1 Oct 2019 14:14:42 +0200 Subject: [PATCH 08/19] Use Swedish 'post' instead of 'photo' Old translation used the Swedish word for 'photo' instead of direclty translating the word 'post'. --- resources/lang/sv/notification.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/resources/lang/sv/notification.php b/resources/lang/sv/notification.php index 6b8f2870f..206d79c97 100644 --- a/resources/lang/sv/notification.php +++ b/resources/lang/sv/notification.php @@ -2,11 +2,11 @@ return [ - 'likedPhoto' => 'gillade ditt foto.', + 'likedPhoto' => 'gillade ditt inlägg.', 'likedComment' => 'gillade din kommentar.', 'startedFollowingYou' => 'började följa dig.', - 'commented' => 'kommenterade ditt foto.', + 'commented' => 'kommenterade ditt inlägg.', 'mentionedYou' => 'nämnde dig.', - 'shared' => 'delade ditt foto.', + 'shared' => 'delade ditt inlägg.', ]; From 061fa0cb6e0381f81e767f2d813774d664112fd6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anton=20Str=C3=B6mkvist?= Date: Tue, 1 Oct 2019 14:23:44 +0200 Subject: [PATCH 09/19] Translate navmenu.php to German --- resources/lang/de/navmenu.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/resources/lang/de/navmenu.php b/resources/lang/de/navmenu.php index 61a223c85..7408e455d 100644 --- a/resources/lang/de/navmenu.php +++ b/resources/lang/de/navmenu.php @@ -2,7 +2,13 @@ return [ + 'search' => 'Suche', + 'home' => 'Heim', + 'local' => 'Lokal', + 'network' => 'Netzwerk', + 'discover' => 'Entdecken', 'viewMyProfile' => 'Mein Profil anschauen', + 'myProfile' => 'Mein Profil', 'myTimeline' => 'Meine Timeline', 'publicTimeline' => 'Öffentliche Timeline', 'remoteFollow' => 'Aus der Ferne folgen', From 0756f477fe96bdd9cd80e99534ef5e589a698736 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anton=20Str=C3=B6mkvist?= Date: Tue, 1 Oct 2019 14:27:12 +0200 Subject: [PATCH 10/19] Translate notification.php to German --- resources/lang/de/notification.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/resources/lang/de/notification.php b/resources/lang/de/notification.php index f57f22e83..e08d6aea5 100644 --- a/resources/lang/de/notification.php +++ b/resources/lang/de/notification.php @@ -3,8 +3,10 @@ return [ 'likedPhoto' => 'gefällt dein Foto.', + 'likedComment' => 'gefällt dein Kommentar.', 'startedFollowingYou' => 'folgt dir nun.', 'commented' => 'hat deinen Post kommentiert.', 'mentionedYou' => 'hat dich erwähnt.', + 'shared' => 'hat deinen Post teilen.', ]; From 0d49150669f13ebcbe24969b4fb3c6cd1518dcd3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anton=20Str=C3=B6mkvist?= Date: Tue, 1 Oct 2019 14:32:47 +0200 Subject: [PATCH 11/19] Translate profile.php to German --- resources/lang/de/profile.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/resources/lang/de/profile.php b/resources/lang/de/profile.php index 89d22473c..44aa5fa50 100644 --- a/resources/lang/de/profile.php +++ b/resources/lang/de/profile.php @@ -9,4 +9,7 @@ return [ 'privateProfileWarning' => 'Dieser Account ist privat', 'alreadyFollow' => ':username bereits folgen?', 'loginToSeeProfile' => 'um deren Bilder und Videos zu sehen.', + + 'status.disabled.header' => 'Profil nicht verfügbar', + 'status.disabled.body' => 'Entschuldigung, dieses Profil ist im Moment nicht verfügbar. Bitte versuchen Sie es später noch einmal.', ]; From 0599f2f0b3c7a24fc2cfa4a1feafafae488d20c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anton=20Str=C3=B6mkvist?= Date: Tue, 1 Oct 2019 14:34:01 +0200 Subject: [PATCH 12/19] Translate site.php to German --- resources/lang/de/site.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/resources/lang/de/site.php b/resources/lang/de/site.php index 9c3cabf56..80510275d 100644 --- a/resources/lang/de/site.php +++ b/resources/lang/de/site.php @@ -12,5 +12,7 @@ return [ 'l10nWip' => 'Wir arbeiten noch an der Unterstützung weiterer Sprachen', 'currentLocale' => 'Aktuelle Sprache', 'selectLocale' => 'Wähle eine der unterstützten Sprachen aus', - + 'contact' => 'Kontakt', + 'contact-us' => 'Kontaktiere uns', + ]; From 483da088ddde3b6a10068627fcacfac51db735dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anton=20Str=C3=B6mkvist?= Date: Tue, 1 Oct 2019 14:49:37 +0200 Subject: [PATCH 13/19] Translate helpcenter.php to German --- resources/lang/de/helpcenter.php | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 resources/lang/de/helpcenter.php diff --git a/resources/lang/de/helpcenter.php b/resources/lang/de/helpcenter.php new file mode 100644 index 000000000..953193239 --- /dev/null +++ b/resources/lang/de/helpcenter.php @@ -0,0 +1,26 @@ + 'Hilfezentrum', + 'whatsnew' => 'Was gibt\'s Neues', + + 'gettingStarted' => 'Loslegen', + 'sharingMedia' => 'Medien teilen', + 'profile' => 'Profil', + 'stories' => 'Stories', + 'hashtags' => 'Hashtags', + 'discover' => 'Entdecken', + 'directMessages' => 'Privatnachrichten', + 'timelines' => 'Timelines', + 'embed' => 'Einbetten', + + 'communityGuidelines' => 'Community-Richtlinien', + 'whatIsTheFediverse' => 'Was ist das Fediversum?', + 'controllingVisibility' => 'Sichtbarkeit steuern', + 'blockingAccounts' => 'Kontosperrung', + 'safetyTips' => 'Sicherheitstipps', + 'reportSomething' => 'Etwas melden', + 'dataPolicy' => 'Datenpolitik' + +]; From 2ee03bd3dd604b9a1a443439f40e5ece344936fc Mon Sep 17 00:00:00 2001 From: okpierre <1679025+okpierre@users.noreply.github.com> Date: Tue, 1 Oct 2019 09:41:17 -0400 Subject: [PATCH 14/19] Update site.php --- resources/lang/en/site.php | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/resources/lang/en/site.php b/resources/lang/en/site.php index e6a2cbfe4..2aa54ef82 100644 --- a/resources/lang/en/site.php +++ b/resources/lang/en/site.php @@ -2,18 +2,18 @@ return [ - 'about' => 'About', - 'help' => 'Help', - 'language' => 'Language', - 'fediverse' => 'Fediverse', - 'opensource' => 'Open Source', - 'terms' => 'Terms', - 'privacy' => 'Privacy', - 'l10nWip' => 'We’re still working on localization support', - 'currentLocale' => 'Current locale', - 'selectLocale' => 'Select one of the supported languages', - 'contact' => 'Contact', - 'contact-us' => 'Contact Us', - 'places' => 'Places', + 'about' => 'About', + 'help' => 'Help', + 'language' => 'Language', + 'fediverse' => 'Fediverse', + 'opensource' => 'Open Source', + 'terms' => 'Terms', + 'privacy' => 'Privacy', + 'l10nWip' => 'We’re still working on localization support', + 'currentLocale' => 'Current locale', + 'selectLocale' => 'Select one of the supported languages', + 'contact' => 'Contact', + 'contact-us' => 'Contact Us', + 'places' => 'Places', ]; From 3f9791503029b06afc531f77dc2a80deabd45bfe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anton=20Str=C3=B6mkvist?= Date: Tue, 1 Oct 2019 22:09:31 +0200 Subject: [PATCH 15/19] Translate 'places' into Swedish and German --- resources/lang/de/site.php | 1 + resources/lang/sv/site.php | 1 + 2 files changed, 2 insertions(+) diff --git a/resources/lang/de/site.php b/resources/lang/de/site.php index 80510275d..c91a1bb39 100644 --- a/resources/lang/de/site.php +++ b/resources/lang/de/site.php @@ -14,5 +14,6 @@ return [ 'selectLocale' => 'Wähle eine der unterstützten Sprachen aus', 'contact' => 'Kontakt', 'contact-us' => 'Kontaktiere uns', + 'places' => 'Plätze', ]; diff --git a/resources/lang/sv/site.php b/resources/lang/sv/site.php index 212115fcb..1411903d5 100644 --- a/resources/lang/sv/site.php +++ b/resources/lang/sv/site.php @@ -14,5 +14,6 @@ return [ 'selectLocale' => 'Välj ett av de språk som stöds', 'contact' => 'Kontakt', 'contact-us' => 'Kontakta oss', + 'places' => 'Platser', ]; From 0397c959f0187ae5d56bfd6762a60391b87ee73e Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Tue, 1 Oct 2019 18:31:05 -0600 Subject: [PATCH 16/19] Update AuthServiceProvider --- app/Providers/AuthServiceProvider.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Providers/AuthServiceProvider.php b/app/Providers/AuthServiceProvider.php index 6f077f832..7de25b357 100644 --- a/app/Providers/AuthServiceProvider.php +++ b/app/Providers/AuthServiceProvider.php @@ -27,7 +27,7 @@ class AuthServiceProvider extends ServiceProvider $this->registerPolicies(); if(config('pixelfed.oauth_enabled')) { - Passport::routes(); + Passport::routes(null, ['middleware' => [ \Barryvdh\Cors\HandleCors::class ]]); Passport::tokensExpireIn(now()->addDays(15)); Passport::refreshTokensExpireIn(now()->addDays(30)); Passport::enableImplicitGrant(); From 715166fc6761c8a7fea204a75fa76a6bf8e8a7bb Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Tue, 1 Oct 2019 18:35:42 -0600 Subject: [PATCH 17/19] Update Http Kernel --- app/Http/Kernel.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/Http/Kernel.php b/app/Http/Kernel.php index 346f245e1..7a8c91efe 100644 --- a/app/Http/Kernel.php +++ b/app/Http/Kernel.php @@ -40,6 +40,7 @@ class Kernel extends HttpKernel 'api' => [ 'throttle:60,1', 'bindings', + \Barryvdh\Cors\HandleCors::class, ], ]; From 21f262315d563b5b8f96f16fa8fb5936cb39dd09 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Tue, 1 Oct 2019 20:53:45 -0600 Subject: [PATCH 18/19] Update AccountTransformer, fixes #1730 --- app/Transformer/Api/Mastodon/v1/AccountTransformer.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/Transformer/Api/Mastodon/v1/AccountTransformer.php b/app/Transformer/Api/Mastodon/v1/AccountTransformer.php index 0d062851e..00a895a17 100644 --- a/app/Transformer/Api/Mastodon/v1/AccountTransformer.php +++ b/app/Transformer/Api/Mastodon/v1/AccountTransformer.php @@ -4,6 +4,7 @@ namespace App\Transformer\Api\Mastodon\v1; use App\Profile; use League\Fractal; +use Illuminate\Support\Str; class AccountTransformer extends Fractal\TransformerAbstract { @@ -11,12 +12,11 @@ class AccountTransformer extends Fractal\TransformerAbstract { $local = $profile->domain == null; $is_admin = !$local ? false : $profile->user->is_admin; - $acct = $local ? $profile->username . '@' . config('pixelfed.domain.app') : substr($profile->username, 1); - $username = $local ? $profile->username : explode('@', $acct)[0]; + $username = $local ? $profile->username : explode('@', substr($profile->username, 1))[0]; return [ 'id' => (string) $profile->id, 'username' => $username, - 'acct' => $acct, + 'acct' => $username, 'display_name' => $profile->name, 'locked' => (bool) $profile->is_private, 'created_at' => $profile->created_at->toJSON(), @@ -32,7 +32,7 @@ class AccountTransformer extends Fractal\TransformerAbstract 'emojis' => [], 'moved' => null, 'fields' => null, - 'bot' => null, + 'bot' => false, 'software' => 'pixelfed', 'is_admin' => (bool) $is_admin, ]; From a79d23d152c17070e2cf3835916b4f37a6fcb066 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Tue, 1 Oct 2019 21:06:42 -0600 Subject: [PATCH 19/19] Update StatusTransformers --- app/Http/Controllers/Api/ApiV1Controller.php | 6 +++++- app/Transformer/Api/Mastodon/v1/StatusTransformer.php | 4 ++-- app/Transformer/Api/StatusTransformer.php | 4 ++-- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/app/Http/Controllers/Api/ApiV1Controller.php b/app/Http/Controllers/Api/ApiV1Controller.php index a90327f4d..ea4a4258a 100644 --- a/app/Http/Controllers/Api/ApiV1Controller.php +++ b/app/Http/Controllers/Api/ApiV1Controller.php @@ -267,7 +267,7 @@ class ApiV1Controller extends Controller 'max_id' => 'nullable|integer|min:0|max:' . PHP_INT_MAX, 'since_id' => 'nullable|integer|min:0|max:' . PHP_INT_MAX, 'min_id' => 'nullable|integer|min:0|max:' . PHP_INT_MAX, - 'limit' => 'nullable|integer|min:1|max:40' + 'limit' => 'nullable|integer|min:1|max:80' ]); $profile = Profile::whereNull('status')->findOrFail($id); @@ -748,6 +748,8 @@ class ApiV1Controller extends Controller ]); if($like->wasRecentlyCreated == true) { + $status->likes_count = $status->likes()->count(); + $status->save(); LikePipeline::dispatch($like); } @@ -777,6 +779,8 @@ class ApiV1Controller extends Controller if($like) { $like->delete(); + $status->likes_count = $status->likes()->count(); + $status->save(); } $resource = new Fractal\Resource\Item($status, new StatusTransformer()); diff --git a/app/Transformer/Api/Mastodon/v1/StatusTransformer.php b/app/Transformer/Api/Mastodon/v1/StatusTransformer.php index 97f0cb4b8..7a5d1cbff 100644 --- a/app/Transformer/Api/Mastodon/v1/StatusTransformer.php +++ b/app/Transformer/Api/Mastodon/v1/StatusTransformer.php @@ -28,8 +28,8 @@ class StatusTransformer extends Fractal\TransformerAbstract 'created_at' => $status->created_at->toJSON(), 'emojis' => [], 'replies_count' => 0, - 'reblogs_count' => $status->reblogs_count, - 'favourites_count' => $status->likes_count, + 'reblogs_count' => $status->reblogs_count ?? 0, + 'favourites_count' => $status->likes_count ?? 0, 'reblogged' => null, 'favourited' => null, 'muted' => null, diff --git a/app/Transformer/Api/StatusTransformer.php b/app/Transformer/Api/StatusTransformer.php index c03a501f6..99d7c4a47 100644 --- a/app/Transformer/Api/StatusTransformer.php +++ b/app/Transformer/Api/StatusTransformer.php @@ -25,8 +25,8 @@ class StatusTransformer extends Fractal\TransformerAbstract 'content' => $status->rendered ?? $status->caption, 'created_at' => $status->created_at->format('c'), 'emojis' => [], - 'reblogs_count' => $status->reblogs_count, - 'favourites_count' => $status->likes_count, + 'reblogs_count' => $status->reblogs_count ?? 0, + 'favourites_count' => $status->likes_count ?? 0, 'reblogged' => $status->shared(), 'favourited' => $status->liked(), 'muted' => null,