|
|
|
@ -74,7 +74,7 @@ const send = async ctx => {
|
|
|
|
|
await createOutboundMessage({ ...toUpsert });
|
|
|
|
|
// wsToSend.sendTextMessage(to, content, actionId);
|
|
|
|
|
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' };
|
|
|
|
|
} catch (error) {
|
|
|
|
|
console.error('Error sending message:', error);
|
|
|
|
|