forked from mirror/pixelfed
commit
5a398c956e
|
@ -43,6 +43,7 @@
|
||||||
- Fix remote avatar urls when not using cloud storage ([672f7c8c](https://github.com/pixelfed/pixelfed/commit/672f7c8c))
|
- Fix remote avatar urls when not using cloud storage ([672f7c8c](https://github.com/pixelfed/pixelfed/commit/672f7c8c))
|
||||||
- Update ResetPasswordController redirectTo path to /i/web as /home is deprecated ([8803c6de](https://github.com/pixelfed/pixelfed/commit/8803c6de))
|
- Update ResetPasswordController redirectTo path to /i/web as /home is deprecated ([8803c6de](https://github.com/pixelfed/pixelfed/commit/8803c6de))
|
||||||
- Fix v1 api block/mute endpoints, refresh RelationshipService cache after relationship changes ([54a5c3be](https://github.com/pixelfed/pixelfed/commit/54a5c3be))
|
- Fix v1 api block/mute endpoints, refresh RelationshipService cache after relationship changes ([54a5c3be](https://github.com/pixelfed/pixelfed/commit/54a5c3be))
|
||||||
|
- Fix NotificationService bug returning html response on /api/v1/notifications endpoint when a notification id belonging to a deleted account is rendered by checking AccountService before NotificationTransformer. ([734b30e5](https://github.com/pixelfed/pixelfed/commit/734b30e5))
|
||||||
- ([](https://github.com/pixelfed/pixelfed/commit/))
|
- ([](https://github.com/pixelfed/pixelfed/commit/))
|
||||||
|
|
||||||
## [v0.11.3 (2022-05-09)](https://github.com/pixelfed/pixelfed/compare/v0.11.2...v0.11.3)
|
## [v0.11.3 (2022-05-09)](https://github.com/pixelfed/pixelfed/compare/v0.11.2...v0.11.3)
|
||||||
|
|
|
@ -203,13 +203,19 @@ class NotificationService {
|
||||||
|
|
||||||
public static function getNotification($id)
|
public static function getNotification($id)
|
||||||
{
|
{
|
||||||
return Cache::remember('service:notification:'.$id, now()->addDays(3), function() use($id) {
|
return Cache::remember('service:notification:'.$id, 86400, function() use($id) {
|
||||||
$n = Notification::with('item')->find($id);
|
$n = Notification::with('item')->find($id);
|
||||||
|
|
||||||
if(!$n) {
|
if(!$n) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$account = AccountService::get($n->actor_id, true);
|
||||||
|
|
||||||
|
if(!$account) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
$fractal = new Fractal\Manager();
|
$fractal = new Fractal\Manager();
|
||||||
$fractal->setSerializer(new ArraySerializer());
|
$fractal->setSerializer(new ArraySerializer());
|
||||||
$resource = new Fractal\Resource\Item($n, new NotificationTransformer());
|
$resource = new Fractal\Resource\Item($n, new NotificationTransformer());
|
||||||
|
|
Loading…
Reference in New Issue