From ebe9c54daed75f2a94a85fcd6c23f49bcce06894 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Thu, 10 Mar 2022 23:55:32 -0700 Subject: [PATCH 1/2] Update ReblogService --- app/Services/ReblogService.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/app/Services/ReblogService.php b/app/Services/ReblogService.php index ff70de378..cbdb539b9 100644 --- a/app/Services/ReblogService.php +++ b/app/Services/ReblogService.php @@ -50,11 +50,19 @@ class ReblogService public static function addPostReblog($parentId, $reblogId) { - return Redis::zadd(self::REBLOGS_KEY . $parentId, $reblogId); + $pid = intval($parentId); + $id = intval($reblogId); + if($pid && $id) { + return Redis::zadd(self::REBLOGS_KEY . $pid, $id); + } } public static function removePostReblog($parentId, $reblogId) { - return Redis::zrem(self::REBLOGS_KEY . $parentId, $reblogId); + $pid = intval($parentId); + $id = intval($reblogId); + if($pid && $id) { + return Redis::zrem(self::REBLOGS_KEY . $pid, $id); + } } } From 4482482e2a359897f6d70322091dc5beb2e75588 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Thu, 10 Mar 2022 23:58:47 -0700 Subject: [PATCH 2/2] Update ReblogService --- app/Services/ReblogService.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Services/ReblogService.php b/app/Services/ReblogService.php index cbdb539b9..dca348bee 100644 --- a/app/Services/ReblogService.php +++ b/app/Services/ReblogService.php @@ -9,8 +9,8 @@ use App\Status; class ReblogService { const CACHE_KEY = 'pf:services:reblogs:'; - const REBLOGS_KEY = 'pf:services:reblogs:post:'; - const COLDBOOT_KEY = 'pf:services:reblogs:post_:'; + const REBLOGS_KEY = 'pf:services:reblogs:v1:post:'; + const COLDBOOT_KEY = 'pf:services:reblogs:v1:post_:'; public static function get($profileId, $statusId) {