Skip to content

Commit

Permalink
no message
Browse files Browse the repository at this point in the history
  • Loading branch information
kuaifan committed Mar 9, 2025
1 parent 9c78db8 commit f6dd1ce
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions app/Tasks/WebSocketDialogMsgTask.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,14 +119,20 @@ public function start()
$mention = array_intersect([0, $userid], $mentions) ? 1 : 0;
$silence = $mention ? false : $silence;
$dot = $msg->type === 'record' ? 1 : 0;
WebSocketDialogMsgRead::createInstance([
$msgRead = WebSocketDialogMsgRead::createInstance([
'dialog_id' => $msg->dialog_id,
'msg_id' => $msg->id,
'userid' => $userid,
'mention' => $mention,
'silence' => $silence,
'dot' => $dot,
])->saveOrIgnore();
]);
if ($msgRead->saveOrIgnore()) {
if ($dialog->session_id && $dialog->session_id != $msg->session_id) {
$msgRead->read_at = Carbon::now();
$msgRead->save();
}
}
$array[$userid] = [
'userid' => $userid,
'mention' => $mention,
Expand Down

0 comments on commit f6dd1ce

Please sign in to comment.