Merge pull request #2494 from pixelfed/staging

Staging
This commit is contained in:
daniel 2020-12-13 16:37:18 -07:00 committed by GitHub
commit 1c949682bf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 3 deletions

View file

@ -132,6 +132,8 @@
- Updated ComposeModal, fix filter bug on safari. ([8e3e7586](https://github.com/pixelfed/pixelfed/commit/8e3e7586)) - 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 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 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) ## [v0.10.9 (2020-04-17)](https://github.com/pixelfed/pixelfed/compare/v0.10.8...v0.10.9)
### Added ### Added

View file

@ -2,9 +2,11 @@
namespace App\Services; namespace App\Services;
use Redis; use Illuminate\Support\Facades\Redis;
use App\Status; use App\Status;
//use App\Transformer\Api\v3\StatusTransformer;
use App\Transformer\Api\StatusStatelessTransformer; use App\Transformer\Api\StatusStatelessTransformer;
use App\Transformer\Api\StatusTransformer;
use League\Fractal; use League\Fractal;
use League\Fractal\Serializer\ArraySerializer; use League\Fractal\Serializer\ArraySerializer;
use League\Fractal\Pagination\IlluminatePaginatorAdapter; use League\Fractal\Pagination\IlluminatePaginatorAdapter;
@ -15,7 +17,7 @@ class StatusService {
public static function get($id) 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) public static function coldGet($id)

View file

@ -47,12 +47,14 @@ class NotificationTransformer extends Fractal\TransformerAbstract
public function replaceTypeVerb($verb) public function replaceTypeVerb($verb)
{ {
$verbs = [ $verbs = [
'dm' => 'direct',
'follow' => 'follow', 'follow' => 'follow',
'mention' => 'mention', 'mention' => 'mention',
'share' => 'reblog', 'share' => 'reblog',
'like' => 'favourite', 'like' => 'favourite',
'comment' => 'mention', 'comment' => 'mention',
'admin.user.modlog.comment' => 'modlog' 'admin.user.modlog.comment' => 'modlog',
'tagged' => 'tagged'
]; ];
return $verbs[$verb]; return $verbs[$verb];
} }