update
This commit is contained in:
@@ -7,6 +7,7 @@ namespace App\Observers;
|
||||
use App\Models\ArtworkComment;
|
||||
use App\Services\UserStatsService;
|
||||
use App\Services\UserMentionSyncService;
|
||||
use App\Services\XPService;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
||||
/**
|
||||
@@ -18,6 +19,7 @@ class ArtworkCommentObserver
|
||||
public function __construct(
|
||||
private readonly UserStatsService $userStats,
|
||||
private readonly UserMentionSyncService $mentionSync,
|
||||
private readonly XPService $xp,
|
||||
) {}
|
||||
|
||||
public function created(ArtworkComment $comment): void
|
||||
@@ -30,6 +32,7 @@ class ArtworkCommentObserver
|
||||
// The commenter is "active"
|
||||
$this->userStats->ensureRow($comment->user_id);
|
||||
$this->userStats->setLastActiveAt($comment->user_id);
|
||||
$this->xp->awardCommentCreated((int) $comment->user_id, (int) $comment->id, 'artwork');
|
||||
$this->mentionSync->syncForComment($comment);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user