only bugs man
This commit is contained in:
@@ -87,10 +87,15 @@ class SupportChatController extends Controller
|
||||
|
||||
public function read(Conversation $conversation): JsonResponse
|
||||
{
|
||||
$sender = $this->assertCanReply(request()->user(), $conversation);
|
||||
$actor = request()->user();
|
||||
$this->assertCanView($actor, $conversation);
|
||||
|
||||
$excludeId = ChatSupport::isOperator($actor)
|
||||
? ChatSupport::user()->id
|
||||
: $actor->id;
|
||||
|
||||
$conversation->messages()
|
||||
->where('user_id', '!=', $sender->id)
|
||||
->where('user_id', '!=', $excludeId)
|
||||
->whereNull('seen_at')
|
||||
->update(['seen_at' => now()]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user