mirror of
https://github.com/pixelfed/pixelfed.git
synced 2025-02-03 02:10:45 +00:00
Update ReblogService
This commit is contained in:
parent
aef373a91c
commit
ebe9c54dae
1 changed files with 10 additions and 2 deletions
|
@ -50,11 +50,19 @@ class ReblogService
|
||||||
|
|
||||||
public static function addPostReblog($parentId, $reblogId)
|
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)
|
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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue