|
|
|
@ -296,7 +296,7 @@ const createWhatsApp = async phone => {
|
|
|
|
|
status: 'open', whatsAppNo, channelId,
|
|
|
|
|
eventSource: serverConfig.name + '.connection.update.open',
|
|
|
|
|
});
|
|
|
|
|
waEmitter.on('request.' + whatsAppNo + '.send.message', event => {
|
|
|
|
|
waEmitter.on('request.' + whatsAppNo + '.send.text', event => {
|
|
|
|
|
const {to: number, externalId, content} = event;
|
|
|
|
|
console.info('request.' + whatsAppNo + '.send.message:', event)
|
|
|
|
|
// const jid = formatPhoneNumber(event.to);
|
|
|
|
@ -321,7 +321,7 @@ const createWhatsApp = async phone => {
|
|
|
|
|
//sendTextMessage(number, content, externalId);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
waEmitter.on('req.' + whatsAppNo + '.send.image', event => {
|
|
|
|
|
waEmitter.on('request.' + whatsAppNo + '.send.image', event => {
|
|
|
|
|
const {to: number, externalId, content} = event;
|
|
|
|
|
const jid = formatPhoneNumber(event.to);
|
|
|
|
|
waSocket.sendMessage(
|
|
|
|
|