mirror of
https://github.com/kuaifan/dootask.git
synced 2026-02-03 11:48:17 +00:00
no message
This commit is contained in:
parent
9c78db8d45
commit
f6dd1ce98e
@ -119,14 +119,20 @@ class WebSocketDialogMsgTask extends AbstractTask
|
|||||||
$mention = array_intersect([0, $userid], $mentions) ? 1 : 0;
|
$mention = array_intersect([0, $userid], $mentions) ? 1 : 0;
|
||||||
$silence = $mention ? false : $silence;
|
$silence = $mention ? false : $silence;
|
||||||
$dot = $msg->type === 'record' ? 1 : 0;
|
$dot = $msg->type === 'record' ? 1 : 0;
|
||||||
WebSocketDialogMsgRead::createInstance([
|
$msgRead = WebSocketDialogMsgRead::createInstance([
|
||||||
'dialog_id' => $msg->dialog_id,
|
'dialog_id' => $msg->dialog_id,
|
||||||
'msg_id' => $msg->id,
|
'msg_id' => $msg->id,
|
||||||
'userid' => $userid,
|
'userid' => $userid,
|
||||||
'mention' => $mention,
|
'mention' => $mention,
|
||||||
'silence' => $silence,
|
'silence' => $silence,
|
||||||
'dot' => $dot,
|
'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] = [
|
$array[$userid] = [
|
||||||
'userid' => $userid,
|
'userid' => $userid,
|
||||||
'mention' => $mention,
|
'mention' => $mention,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user