From 3a428366fb3fc0cefa9e26ad26ece9359e0cc761 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Sun, 13 Dec 2020 16:03:44 -0700 Subject: [PATCH 1/3] Update NotificationTransformer, add missing types --- app/Transformer/Api/Mastodon/v1/NotificationTransformer.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/Transformer/Api/Mastodon/v1/NotificationTransformer.php b/app/Transformer/Api/Mastodon/v1/NotificationTransformer.php index 1f7bdf273..364659574 100644 --- a/app/Transformer/Api/Mastodon/v1/NotificationTransformer.php +++ b/app/Transformer/Api/Mastodon/v1/NotificationTransformer.php @@ -47,12 +47,14 @@ class NotificationTransformer extends Fractal\TransformerAbstract public function replaceTypeVerb($verb) { $verbs = [ + 'dm' => 'direct', 'follow' => 'follow', 'mention' => 'mention', 'share' => 'reblog', 'like' => 'favourite', 'comment' => 'mention', - 'admin.user.modlog.comment' => 'modlog' + 'admin.user.modlog.comment' => 'modlog', + 'tagged' => 'tagged' ]; return $verbs[$verb]; } From 1ea2db74b226930c4a4cb5b52185a72e55f8b0d4 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Sun, 13 Dec 2020 16:08:59 -0700 Subject: [PATCH 2/3] Update StatusService, fix json bug --- app/Services/StatusService.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/Services/StatusService.php b/app/Services/StatusService.php index 289fcdf88..2fc4634a9 100644 --- a/app/Services/StatusService.php +++ b/app/Services/StatusService.php @@ -2,9 +2,11 @@ namespace App\Services; -use Redis; +use Illuminate\Support\Facades\Redis; use App\Status; +//use App\Transformer\Api\v3\StatusTransformer; use App\Transformer\Api\StatusStatelessTransformer; +use App\Transformer\Api\StatusTransformer; use League\Fractal; use League\Fractal\Serializer\ArraySerializer; use League\Fractal\Pagination\IlluminatePaginatorAdapter; @@ -15,7 +17,7 @@ class StatusService { public static function get($id) { - return Redis::get(self::CACHE_KEY . $id) ?? self::coldGet($id); + return json_decode(Redis::get(self::CACHE_KEY . $id) ?? self::coldGet($id)); } public static function coldGet($id) From 980b72c11edf1f065c2922ca05b56935073144f0 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Sun, 13 Dec 2020 16:09:32 -0700 Subject: [PATCH 3/3] Update changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index bac195797..cba00ac39 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -132,6 +132,8 @@ - Updated ComposeModal, fix filter bug on safari. ([8e3e7586](https://github.com/pixelfed/pixelfed/commit/8e3e7586)) - Updated StatusStatelessController, remove unused attributes. ([d0d46807](https://github.com/pixelfed/pixelfed/commit/d0d46807)) - Updated Profile, fix follower counter bug. ([d06bec9c](https://github.com/pixelfed/pixelfed/commit/d06bec9c)) +- Updated NotificationTransformer, add missing types. ([3a428366](https://github.com/pixelfed/pixelfed/commit/3a428366)) +- Updated StatusService, fix json bug. ([1ea2db74](https://github.com/pixelfed/pixelfed/commit/1ea2db74)) ## [v0.10.9 (2020-04-17)](https://github.com/pixelfed/pixelfed/compare/v0.10.8...v0.10.9) ### Added