no message

This commit is contained in:
kuaifan
2022-07-05 14:34:23 +08:00
parent 8eb956f831
commit ef2b1dd321
5 changed files with 30 additions and 9 deletions

View File

@@ -526,9 +526,10 @@ class WebSocketDialogMsg extends AbstractModel
* @param array $msg 发送的消息
* @param int $sender 发送的会员ID默认自己0为系统
* @param bool $push_self 是否推送给自己
* @param bool $push_retry 推送失败后重试1次有时候在事务里执行数据还没生成时会出现找不到消息的情况
* @return array
*/
public static function sendMsg($action, $dialog_id, $type, $msg, $sender = 0, $push_self = false)
public static function sendMsg($action, $dialog_id, $type, $msg, $sender = 0, $push_self = false, $push_retry = false)
{
$link = 0;
$mtype = $type;
@@ -612,6 +613,9 @@ class WebSocketDialogMsg extends AbstractModel
if ($push_self) {
$task->setIgnoreFd(null);
}
if ($push_retry) {
$task->setMsgNotExistRetry(true);
}
Task::deliver($task);
//
return Base::retSuccess('发送成功', $dialogMsg);