fix(housekeeping): remove unnecessary $tablePrefix variable when resetting post count

fixes #383
This commit is contained in:
Yassine Doghri 2023-11-16 10:54:32 +00:00
parent 3d5fc14d5e
commit 97d793f55e
1 changed files with 2 additions and 4 deletions

View File

@ -12,7 +12,6 @@ namespace Modules\Fediverse\Models;
use CodeIgniter\Events\Events;
use CodeIgniter\Model;
use Config\Database;
use Modules\Fediverse\Config\Fediverse;
use Modules\Fediverse\Entities\Actor;
@ -283,9 +282,8 @@ class ActorModel extends Model
public function resetPostsCount(): int | false
{
$actorsFollowersCount = $this->db->table($tablePrefix . 'fediverse_posts')->select(
'actor_id as id, COUNT(*) as `posts_count`'
)
$actorsFollowersCount = $this->db->table('fediverse_posts')
->select('actor_id as id, COUNT(*) as `posts_count`')
->where([
'in_reply_to_id' => null,
])