diff --git a/app/Models/WebSocketDialogMsg.php b/app/Models/WebSocketDialogMsg.php index 8ce301434..05a099420 100644 --- a/app/Models/WebSocketDialogMsg.php +++ b/app/Models/WebSocketDialogMsg.php @@ -603,7 +603,7 @@ class WebSocketDialogMsg extends AbstractModel * @param bool $push_self 推送-是否推给自己 * @param bool $push_retry 推送-失败后重试1次(有时候在事务里执行,数据还没生成时会出现找不到消息的情况) * @param bool|null $push_silence 推送-静默 - * - type = [notice|tag|todo] 默认为:true + * - type = [text|file|record|meeting] 默认为:false * @return array */ public static function sendMsg($action, $dialog_id, $type, $msg, $sender = 0, $push_self = false, $push_retry = false, $push_silence = null) @@ -623,7 +623,7 @@ class WebSocketDialogMsg extends AbstractModel } } if ($push_silence === null) { - $push_silence = in_array($type, ['notice', 'tag', 'todo']); + $push_silence = !in_array($type, ["text", "file", "record", "meeting"]); } // $update_id = preg_match("/^update-(\d+)$/", $action, $match) ? $match[1] : 0; diff --git a/app/Tasks/EmailNoticeTask.php b/app/Tasks/EmailNoticeTask.php index 53b908eb1..ed394c094 100644 --- a/app/Tasks/EmailNoticeTask.php +++ b/app/Tasks/EmailNoticeTask.php @@ -82,6 +82,7 @@ class EmailNoticeTask extends AbstractTask if ($userMinute > -1) { $builder->clone() ->where("web_socket_dialog_msgs.dialog_type", "user") + ->whereIn("web_socket_dialog_msgs.type", ["text", "file", "record", "meeting"]) ->whereBetween("web_socket_dialog_msgs.created_at", [ Carbon::now()->subMinutes($userMinute + 10), Carbon::now()->subMinutes($userMinute) @@ -94,6 +95,7 @@ class EmailNoticeTask extends AbstractTask if ($groupMinute > -1) { $builder->clone() ->where("web_socket_dialog_msgs.dialog_type", "group") + ->whereIn("web_socket_dialog_msgs.type", ["text", "file", "record", "meeting"]) ->whereBetween("web_socket_dialog_msgs.created_at", [ Carbon::now()->subMinutes($groupMinute + 10), Carbon::now()->subMinutes($groupMinute) @@ -186,6 +188,7 @@ class EmailNoticeTask extends AbstractTask ->where("r.email", 0) ->where("r.userid", $userid) ->where("web_socket_dialog_msgs.dialog_type", $dialogType) + ->whereIn("web_socket_dialog_msgs.type", ["text", "file", "record", "meeting"]) ->take(100) ->get(); if (empty($data)) {