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