|
@ -231,9 +231,9 @@ function receiveBotRes(payload) { |
|
|
const amount = dat.message.amount || 0; |
|
|
const amount = dat.message.amount || 0; |
|
|
const msg_uuid = dat.message.uuid || ''; |
|
|
const msg_uuid = dat.message.uuid || ''; |
|
|
const content = dat.message.content; |
|
|
const content = dat.message.content; |
|
|
const botName = dat.bot_name; |
|
|
|
|
|
const action = dat.action; |
|
|
const action = dat.action; |
|
|
const bot_name = dat.bot_name; |
|
|
const bot_name = dat.bot_name; |
|
|
|
|
|
const sender_alias = dat.sender.alias; |
|
|
if (!chat_uuid) |
|
|
if (!chat_uuid) |
|
|
return console.log('=> receiveBotRes Error no chat_uuid'); |
|
|
return console.log('=> receiveBotRes Error no chat_uuid'); |
|
|
const chat = yield models_1.models.Chat.findOne({ where: { uuid: chat_uuid } }); |
|
|
const chat = yield models_1.models.Chat.findOne({ where: { uuid: chat_uuid } }); |
|
@ -271,7 +271,7 @@ function receiveBotRes(payload) { |
|
|
status: constants.statuses.confirmed, |
|
|
status: constants.statuses.confirmed, |
|
|
createdAt: date, |
|
|
createdAt: date, |
|
|
updatedAt: date, |
|
|
updatedAt: date, |
|
|
senderAlias: botName || 'Bot', |
|
|
senderAlias: sender_alias || 'Bot', |
|
|
}; |
|
|
}; |
|
|
const message = yield models_1.models.Message.create(msg); |
|
|
const message = yield models_1.models.Message.create(msg); |
|
|
socket.sendJson({ |
|
|
socket.sendJson({ |
|
|