perf(wai): 消息发送事件名称

dev/supplier-email-drawer
Lei OT 9 months ago
parent eceec840d6
commit ad6f28ef85

@ -74,7 +74,7 @@ const send = async ctx => {
await createOutboundMessage({ ...toUpsert }); await createOutboundMessage({ ...toUpsert });
// wsToSend.sendTextMessage(to, content, actionId); // wsToSend.sendTextMessage(to, content, actionId);
const messagePayload = ctxToSendBuilder(_data); const messagePayload = ctxToSendBuilder(_data);
waEmitter.emit('request.' + from + '.send.' + msgtype, messagePayload); waEmitter.emit('request.' + from + '.send.message', messagePayload);
return 'Message sent successfully'; // { wsToSend, ret: 'Message sent successfully' }; return 'Message sent successfully'; // { wsToSend, ret: 'Message sent successfully' };
} catch (error) { } catch (error) {
console.error('Error sending message:', error); console.error('Error sending message:', error);

Loading…
Cancel
Save