perf: 优化发送消息接口

This commit is contained in:
Pang 2024-01-14 20:12:21 +08:00
parent 9a69d20949
commit 80af98111b

View File

@ -919,14 +919,14 @@ class DialogController extends AbstractController
'ext' => $ext,
];
$result = WebSocketDialogMsg::sendMsg($action, $dialog_id, 'file', $fileData, $user->userid, false, false, $silence);
}
//
} else {
$msgData = ['text' => $text];
if ($markdown) {
$msgData['type'] = 'md';
}
$result = WebSocketDialogMsg::sendMsg($action, $dialog_id, 'text', $msgData, $user->userid, false, false, $silence);
}
}
return $result;
}