feat: 强制content为string
This commit is contained in:
parent
5f7816f139
commit
36b602da61
@ -45,11 +45,16 @@ export const manageMessageReq = async (req: Request) => {
|
||||
// 发送消息列表
|
||||
const sendList = [] as Promise<any>[];
|
||||
|
||||
const finalContent =
|
||||
typeof body.content !== "string"
|
||||
? JSON.stringify(body.content)
|
||||
: body.content;
|
||||
|
||||
// 构造发送消息函数
|
||||
const makeSendFunc = (receive_id_type: ReceiveIDType) => {
|
||||
return (receive_id: string) => {
|
||||
sendList.push(
|
||||
sendMsg(receive_id_type, receive_id, body.msg_type, body.content).then(
|
||||
sendMsg(receive_id_type, receive_id, body.msg_type, finalContent).then(
|
||||
(res) => {
|
||||
sendRes[receive_id_type][receive_id] = res;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user