Skip to content

Commit

Permalink
Update ReadMessageHandler.php
Browse files Browse the repository at this point in the history
  • Loading branch information
KyrneDev authored Dec 7, 2021
1 parent 652131a commit 7396c7e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Commands/ReadMessageHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ public function handle(ReadMessage $command)
$oldRead = $convUser->last_read_message_number;

$message = Message::find($data['messageId']);

if ($message->conversation_id != $conversation->id) {
throw new PermissionDeniedException;
}

$number = $message->number;

Expand Down

0 comments on commit 7396c7e

Please sign in to comment.