Baileys icon indicating copy to clipboard operation
Baileys copied to clipboard

[BUG] Template message , Button Messages and List messages are not going to whatsapp app

Open imReCoder opened this issue 2 years ago • 74 comments

Template message , Button Messages and List messages are not going to whatsapp app but its visible on whatsapp web.

Everything was working fine but after I updated my whatsapp app today template messages are not visible on whatsapp app , text message is working fine.

anyone know about this ? Any help will be apprecialble

imReCoder avatar Aug 08 '22 18:08 imReCoder

+1

ajeelias avatar Aug 08 '22 19:08 ajeelias

+1

100n0m3 avatar Aug 08 '22 19:08 100n0m3

+1

andrody avatar Aug 08 '22 19:08 andrody

+1

IanosJunior avatar Aug 08 '22 19:08 IanosJunior

me too Same problem no work in android or IPhone

Any Fix ?

dafner avatar Aug 08 '22 21:08 dafner

@imReCoder https://github.com/adiwajshing/Baileys/pull/1990/commits/0c3824eb366f319007a47b1a65d646c1a6bfc8c1

mateuscdor avatar Aug 08 '22 21:08 mateuscdor

@mateuscdor Thanks very much!! it's working again!!!

dafner avatar Aug 08 '22 21:08 dafner

Patch Works for WhatsApp on IOS but not on Android.

S0c5 avatar Aug 08 '22 22:08 S0c5

@mateuscdor Thanks very much!! it's working again!!!

Is it working for android and ios both?

imReCoder avatar Aug 08 '22 22:08 imReCoder

@mateuscdor Thanks very much!! it's working again!!!

Is it working for android and ios both?

which whatsapp version do you use?

tarikhagustia avatar Aug 09 '22 00:08 tarikhagustia

Hi,

I installed this version: npm install github:adiwajshing/baileys

and then modify the following file ( lib/Utils/message.js) so that the patchMessageForMdIfRequired function is as shown below:

/**

  • this is an experimental patch to make buttons work
  • Don't know how it works, but it does for now */ const patchMessageForMdIfRequired = (message) => { const requiresPatch = !!(message.buttonsMessage || message.templateMessage || message.listMessage); if (requiresPatch) { message = { viewOnceMessage: { message: { messageContextInfo: generateContextInfo(), ...message } } }; } return message; };

By the way, I found that the function sendReadReceipt is not available any more.

It's there any other method to mark as read one message by id?

dafner avatar Aug 09 '22 00:08 dafner

Not work for iPhone, only work on Android

enoksaju avatar Aug 09 '22 05:08 enoksaju

Template message , Button Messages and List messages are not going to whatsapp app but its visible on whatsapp web.

Everything was working fine but after I updated my whatsapp app today template messages are not visible on whatsapp app , text message is working fine.

anyone know about this ? Any help will be apprecialble

Have you already tried using the Baileys version from github? is the version that contains the patch, try using:

npm i github:adiwajshing/Baileys

or

yarn add github:adiwajshing/Baileys

Practically the problem would already be solved.

AbuYoga avatar Aug 09 '22 12:08 AbuYoga

@AbuYoga I have updated to latest version but same problem.

imReCoder avatar Aug 09 '22 15:08 imReCoder

I think, whatsapp disabled sending Template message (Button, List messages) for non-business accounts. Now only verified business accounts can send.

ORMiK0 avatar Aug 09 '22 15:08 ORMiK0

@ORMiK0 this may possible but not sure. Template messages are visible on whatsapp web, its just not showing on app

imReCoder avatar Aug 09 '22 16:08 imReCoder

I think, whatsapp disabled sending Template message (Button, List messages) for non-business accounts. Now only verified business accounts can send.

not true, I have here another number that is not verified and buttons are working.

100n0m3 avatar Aug 09 '22 18:08 100n0m3

I think, whatsapp disabled sending Template message (Button, List messages) for non-business accounts. Now only verified business accounts can send.

not true, I have here another number that is not verified and buttons are working.

this feature is disabled on whatsapp version

  • ios : 2.22.16.77 or higher

working with android version (2.22.16.75) or higher

tarikhagustia avatar Aug 09 '22 23:08 tarikhagustia

That means end of template message with baileyas. Very sad...

imReCoder avatar Aug 10 '22 00:08 imReCoder

buttons for non verified are working for iphone and android just test with another bot number.

100n0m3 avatar Aug 10 '22 13:08 100n0m3

@100n0m3 I have tested with lots of numbers but its same. Have you updated your whatsapp app to latest version because its working if you are using previous version of whatsapp app.

imReCoder avatar Aug 10 '22 13:08 imReCoder

@100n0m3 I have tested with lots of numbers but its same. Have you updated your whatsapp app to latest version because its working if you are using previous version of whatsapp app.

Working both for me

makanSukros avatar Aug 10 '22 13:08 makanSukros

sorry @100n0m3 , but what means "... its working if you are using previous version of whatsapp app"? I have power off the phone and the whatsapp app is not updated since the last session when scanned the QR. Could you explain me in more details? because I tested my bot in 3 iphone and not only not work the buttons also the whatsapp app in iphone crash with the last update of Bailey library from github

Thanks for your help!

dafner avatar Aug 10 '22 15:08 dafner

The funny thing is that it works in private chats but not in groups.

Saidemx avatar Aug 10 '22 15:08 Saidemx

More funny things is that how its working for you in private also. Its not working anywhere except whatsapp web.

imReCoder avatar Aug 10 '22 15:08 imReCoder

What I'm trying to say is that the list buttons etc... are working in the latest version available either whatsapp normal or business including the beta version and on the iphone too, I just don't know which lib they are using, so whatever the problem is with this lib and not with whatsapp.

100n0m3 avatar Aug 10 '22 16:08 100n0m3

With this lib the buttons work 100%. See what they did and tweak the baileys.

https://github.com/wppconnect-team/wa-js/releases/download/v2.10.1/wppconnect-wa.js

To send buttons, use:

WPP.chat.sendTextMessage('[email protected]','Se liga na novidade: Novos botões voltando na Versão MD!', { useTemplateButtons: true, createChat: true, buttons: [ { url: 'https://wa.me/558196302385', text: 'Fale conosco' }, { url: 'https://www.hci.com.br/', text: 'Acesse nosso site' }, { id: '001', text: 'Curti' }, { id: '002', text: 'Show de Bola' } ],

	footer: 'Este é um teste de uma conta normal, usando a Versão Beta MultiDevice' // Optional
}

);

mikelustosa avatar Aug 11 '22 11:08 mikelustosa

Hi @mikelustosa I see that in this proyect also report this problem since 2 days ago and there is not solution by the moment: https://github.com/wppconnect-team/wa-js/issues/584

dafner avatar Aug 11 '22 15:08 dafner

any updates guys ?

imReCoder avatar Aug 13 '22 06:08 imReCoder

+1

Maker4You avatar Aug 13 '22 13:08 Maker4You

any update guys? +1

Cloud-Dark avatar Aug 13 '22 15:08 Cloud-Dark

+1

artmerlop avatar Aug 14 '22 01:08 artmerlop

+1

muazzissnajmi avatar Aug 15 '22 14:08 muazzissnajmi

+1

JuniorPaula avatar Aug 15 '22 15:08 JuniorPaula

+1

cassiano-guardianserver avatar Aug 17 '22 13:08 cassiano-guardianserver

+1

robinhodemorais avatar Aug 17 '22 18:08 robinhodemorais

info coeg

KiZakiXD avatar Aug 17 '22 22:08 KiZakiXD

Template message , Button Messages and List messages are not going to whatsapp app but its visible on whatsapp web.

Everything was working fine but after I updated my whatsapp app today template messages are not visible on whatsapp app , text message is working fine.

anyone know about this ? Any help will be apprecialble

+1

DineshValor avatar Aug 18 '22 10:08 DineshValor

+1, replied in another open issue. Baileys sends the message just fine and whatsapp web receives them properly. It seems to be a phone app thing. In my case, not working with: v 2.22.16.77 for iOS

alsak0de avatar Aug 18 '22 14:08 alsak0de

+1

gbenmelej avatar Aug 19 '22 13:08 gbenmelej

Any updates?

enoksaju avatar Aug 19 '22 13:08 enoksaju

anyone help how to add template message in webhook?

thisfardi avatar Aug 19 '22 18:08 thisfardi

Is this solved?

gbenmelej avatar Aug 22 '22 12:08 gbenmelej

Can someone who has the business account try to to send a template message to the jetbreak ios's whatsapp and use frida to capture the xmpp message ,send the msg to here ,maybe someone can help?

thanks,guys!

andersling avatar Aug 22 '22 13:08 andersling

Hi,

Also have the same issue. I Can see it on whatsapp web but not the phone

morganzysman avatar Aug 22 '22 18:08 morganzysman

any update?

aarvee022 avatar Aug 23 '22 06:08 aarvee022

hope someone who has the business API can capture the templates packages to here ,maybe we can find out the difference between NOT API's and the API's.

andersling avatar Aug 23 '22 07:08 andersling

@andersling A965D305-F353-4EAB-976E-ED90ED328CE9

artmerlop avatar Aug 23 '22 09:08 artmerlop

@andersling A965D305-F353-4EAB-976E-ED90ED328CE9

@artmerlop thanks very much for your cooperation,sir! Your message demo is useful: I compare for the android working structure which no show correctly on iOS, I found that the android version let the deviceListMetadata to null, but your working one on iOS's WA has a value to it. Can you show up more detail for these message sub structures? thanks!

andersling avatar Aug 23 '22 13:08 andersling

I really hope that this can help to template buttons  working on iOS again 🙏

El 23/08/2022 a las 10:38 a. m., andersling escribió:

@andersling <https://github.com/andersling>
A965D305-F353-4EAB-976E-ED90ED328CE9
<https://user-images.githubusercontent.com/50642674/186119892-58fa0d88-da29-45d5-a6d7-1a3656a502a9.png>

@artmerlop https://github.com/artmerlop thanks very much for your cooperation,sir! Your message demo is useful: I compare for the android working structure which no show correctly on iOS, I found that the android version let the deviceListMetadata to null, but your working one on iOS's WA has a value to it. Can you show up more detail for these message sub structures? thanks!

— Reply to this email directly, view it on GitHub https://github.com/adiwajshing/Baileys/issues/2006#issuecomment-1224091063, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACR6455NDGSWLNHMME3WUBLV2TH6JANCNFSM556EHPFQ. You are receiving this because you commented.Message ID: @.***>

dafner avatar Aug 23 '22 14:08 dafner

I really hope that this can help to template buttons  working on iOS again El 23/08/2022 a las 10:38 a. m., andersling escribió: @andersling https://github.com/andersling A965D305-F353-4EAB-976E-ED90ED328CE9 https://user-images.githubusercontent.com/50642674/186119892-58fa0d88-da29-45d5-a6d7-1a3656a502a9.png @artmerlop https://github.com/artmerlop thanks very much for your cooperation,sir! Your message demo is useful: I compare for the android working structure which no show correctly on iOS, I found that the android version let the deviceListMetadata to null, but your working one on iOS's WA has a value to it. Can you show up more detail for these message sub structures? thanks! — Reply to this email directly, view it on GitHub <#2006 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACR6455NDGSWLNHMME3WUBLV2TH6JANCNFSM556EHPFQ. You are receiving this because you commented.Message ID: @.***> @dafner we all will try our best,sir! But as for me , I don't have the business API account which can send working temlate message to iOS's WA (with jailbreak iOS and frida) ,so that we can compare what is wrong with the iOS version but working well on andorid version. btw, do you have the bussiness API account that can send some demo template message? sir

good luck to all,guys!

andersling avatar Aug 23 '22 15:08 andersling

@andersling more details:

Captura de pantalla 2022-08-23 a la(s) 15 52 08 Captura de pantalla 2022-08-23 a la(s) 15 53 35

artmerlop avatar Aug 23 '22 20:08 artmerlop

@andersling more details:

Captura de pantalla 2022-08-23 a la(s) 15 52 08 Captura de pantalla 2022-08-23 a la(s) 15 53 35

This JSON is Invalid in json formatter.

mikelustosa avatar Aug 23 '22 23:08 mikelustosa

@andersling more details:

Captura de pantalla 2022-08-23 a la(s) 15 52 08 Captura de pantalla 2022-08-23 a la(s) 15 53 35

@artmerlop Thanks for your useful information,sir! After a lot tries base on your message info ,I found that maybe iOS issue is relati DeviceListMetadata ,but this important information are lacked in your message struct, would you do me a favor to send it here? thanks a lot!

have a nice day!

andersling avatar Aug 24 '22 00:08 andersling

@andersling here is the full json.

{ "key":{ "remoteJid":"[email protected]", "fromMe":false, "id":"----------------" }, "messageTimestamp":1661316832, "pushName":"----------------", "message":{ "templateMessage":{ "hydratedTemplate":{ "hydratedTitleText":"Titulo", "hydratedContentText":"Contenido", "hydratedFooterText":"Pie", "hydratedButtons":[ {"quickReplyButton":{"displayText":"prueba","id":"boton 1"},"index":0}, {"quickReplyButton":{"displayText":"otra prueba","id":"otra boton 2"},"index":1}, {"quickReplyButton":{"displayText":"última prueba","id":"boton 3"},"index":2} ], "templateId":"----------------" } }, "messageContextInfo":{ "deviceListMetadata":{ "recipientKeyHash":"tes1Rqv2/uRgeP==", "recipientTimestamp":"1661316713" }, "deviceListMetadataVersion":2 } }, "verifiedBizName":"Test Number" }

artmerlop avatar Aug 24 '22 05:08 artmerlop

@andersling here is the full json.

{ "key":{ "remoteJid":"[email protected]", "fromMe":false, "id":"----------------" }, "messageTimestamp":1661316832, "pushName":"----------------", "message":{ "templateMessage":{ "hydratedTemplate":{ "hydratedTitleText":"Titulo", "hydratedContentText":"Contenido", "hydratedFooterText":"Pie", "hydratedButtons":[ {"quickReplyButton":{"displayText":"prueba","id":"boton 1"},"index":0}, {"quickReplyButton":{"displayText":"otra prueba","id":"otra boton 2"},"index":1}, {"quickReplyButton":{"displayText":"última prueba","id":"boton 3"},"index":2} ], "templateId":"----------------" } }, "messageContextInfo":{ "deviceListMetadata":{ "recipientKeyHash":"tes1Rqv2/uRgeP==", "recipientTimestamp":"1661316713" }, "deviceListMetadataVersion":2 } }, "verifiedBizName":"Test Number" }

thank you,sir! I will try to solve it as soon as possible ,and report the result to you!
BTW, what is you iOS WA version? 2.22.16.77 or so?

have a nice day!

andersling avatar Aug 24 '22 06:08 andersling

For me, using WA version 2.2228.8 (Latest) solved the problem.

gelpiu-developers avatar Aug 24 '22 09:08 gelpiu-developers

For me, using WA version 2.2228.8 (Latest) solved the problem.

Your device is iPhone or web? WA iOS version current is 2.22.16.77 or so , android version is 2.22.17.77 or so

thanks!

andersling avatar Aug 24 '22 12:08 andersling

@andersling my version is 2.22.16.77

artmerlop avatar Aug 24 '22 13:08 artmerlop

For me, using WA version 2.2228.8 (Latest) solved the problem.

This is when starting the instance in baileys?

enoksaju avatar Aug 24 '22 13:08 enoksaju

Hi guys!

I am solved the problem. In my case the reason is when the list text is empty.

This works fine for me. I add a single space in the text.

const listMessage = { text: " ", footer: "", title: "Seleccione un operador", buttonText: "Operadores disponibles", sections }

gbenmelej avatar Aug 24 '22 13:08 gbenmelej

For me, using WA version 2.2228.8 (Latest) solved the problem.

This is when starting the instance in baileys?

Yes!

gelpiu-developers avatar Aug 24 '22 14:08 gelpiu-developers

Didn't work for me on 2.22.16.77

alsak0de avatar Aug 24 '22 15:08 alsak0de

@andersling my version is 2.22.16.77 @artmerlop @artmerlop thank you! the same as mime! and by the way, how do you get your json message, use frida on iOS? as to now, I think the difference between android version's template message and the iOS is that the metadatalist: android can accept it as nil and show correctly, but iOS not , just show it as empty message . anyone has other idea? and , would you do me a favor to send a template message to my iOS device? my num is : 212656688319

thanks a lot!

andersling avatar Aug 25 '22 09:08 andersling

@artmerlop hi,sir ,do you like to join TG ( https://t.me/Premium_SMS_Messenger ) which created by salykingleb on another thread: https://github.com/adiwajshing/Baileys/issues/2077

have a nice day!

andersling avatar Aug 26 '22 15:08 andersling

@artmerlop hi,sir ,do you like to join TG ( https://t.me/Premium_SMS_Messenger ) which created by salykingleb on another thread: #2077

have a nice day!

Created a chat on this issue - join us https://t.me/+V6GroUtzFxM0YzEy A little different link

salykingleb avatar Aug 26 '22 16:08 salykingleb

Hi guys!

I am solved the problem. In my case the reason is when the list text is empty.

This works fine for me. I add a single space in the text.

const listMessage = { text: " ", footer: "", title: "Seleccione un operador", buttonText: "Operadores disponibles", sections }

Did it work with someone else?

ricocrivelli avatar Aug 29 '22 12:08 ricocrivelli

Hi,

I was able to send the example message below to an iPhone 13 pro max, ios 15.6.1 and whatsapp 2.22.16.77

    async sendMediaMessage(to, message) {         const jid = this.getWhatsAppId(to)

        await this.verifyId(jid) /*         const data = await this.instance.sock?.sendMessage(             jid,             message         )         .then(handler.addMessage); */ const buttons = [   {buttonId: 'id1', buttonText: {displayText: 'Button 1'}, type: 1},   {buttonId: 'id2', buttonText: {displayText: 'Button 2'}, type: 1},   {buttonId: 'id3', buttonText: {displayText: 'Button 3'}, type: 1} ]

const buttonMessage = {     text: "Hi it's button message",     footer: 'Hello World',     buttons: buttons,     headerType: 1 }

const sendMsg = await this.instance.sock?.sendMessage(jid, buttonMessage)

        return data     }

El 29/08/2022 a las 09:24 a. m., Ricardo Crivelli escribió:

Hi guys!

I am solved the problem. In my case the reason is when the list
text is empty.

This works fine for me. I add a single space in the text.

|const listMessage = { text: " ", footer: "", title: "Seleccione
un operador", buttonText: "Operadores disponibles", sections }|

Did it work with someone else?

— Reply to this email directly, view it on GitHub https://github.com/adiwajshing/Baileys/issues/2006#issuecomment-1230215164, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACR6454XAKA2VLJHKFCJDALV3STX7ANCNFSM556EHPFQ. You are receiving this because you were mentioned.Message ID: @.***>

dafner avatar Aug 29 '22 16:08 dafner

follow on this

button, template and list message not appear when phone closed all the apps whatsapp. not running in background the message not appear.

test on IOS

mzayn avatar Sep 03 '22 04:09 mzayn