发送消息, 同步的结果; 测试服务: externalId为负

dev/supplier-email-drawer
Lei OT 9 months ago
parent 644c3f4496
commit 5bd8122c50

@ -24,10 +24,8 @@ exports.sendText = async ctx => {
// return wsToSend; // return wsToSend;
try { try {
wsToSend.sendTextMessage(to, content, actionId).then(sockMsg => { wsToSend.sendTextMessage(to, content, actionId).then(sockMsg => {
const { const { key } = sockMsg;
key: { id }, upsertOutboundMessage(null, { ...ctx.request.body, id: key.id || '' });
} = sockMsg;
upsertOutboundMessage(null, { ...ctx.request.body, id });
}); });
// const sockMsg = await wsToSend.sendTextMessage(to, content, actionId); // const sockMsg = await wsToSend.sendTextMessage(to, content, actionId);
return 'Message sent successfully'; // { wsToSend, ret: 'Message sent successfully' }; return 'Message sent successfully'; // { wsToSend, ret: 'Message sent successfully' };

Loading…
Cancel
Save