Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] buttons and lists stopped working #56

Closed
filipeloose opened this issue May 10, 2023 · 54 comments
Closed

[BUG] buttons and lists stopped working #56

filipeloose opened this issue May 10, 2023 · 54 comments
Labels
bug Something isn't working wontfix This will not be worked on

Comments

@filipeloose
Copy link

filipeloose commented May 10, 2023

No description provided.

@filipeloose filipeloose added the bug Something isn't working label May 10, 2023
@batarabagus
Copy link

Yes, after the latest update on Android today, list and button messages didn't show up on the receiver.

@Kawasan-Opensource
Copy link

same issue

@makanSukros
Copy link

Same with me any Solution ?

No solution for now, but to appear on wa web you can still add the viewOnce parameter

@vishwajit76
Copy link

Same Issue

@arskyy
Copy link

arskyy commented May 10, 2023

it's a sign that it's time for you to change lib:v hehehe

@makanSukros
Copy link

it's a sign that it's time for you to change lib:v hehehe

It's not about this lib, but indeed at this time WhatsApp has an update and some are missing, I tried other libs and got the same thing, it's good that we try to solve this problem together

@lambangwi
Copy link

It's not about this lib, but indeed at this time WhatsApp has an update and some are missing, I tried other libs and got the same thing, it's good that we try to solve this problem together

right bro
the problem is not in the lib... there may be an update on the whatsapp server not on the client

@KiZakiXD
Copy link

itu tandanya sudah saatnya kalian ganti lib:v hehehe

🐒

@KiZakiXD
Copy link

Rip Baileys?

@hmcorpltd
Copy link

I have just checked that now i am not getting response to list messages from the bank who are using official api. Seems this bug is temporary.

@makanSukros
Copy link

2, 2228, 8

Not work on ios

@MaznAbdullah
Copy link

I have just checked that now i am not getting response to list messages from the bank who are using official api. Seems this bug is temporary.

wati working /:

@lambangwi
Copy link

I have just checked that now i am not getting response to list messages from the bank who are using official api. Seems this bug is temporary.

image
btw this using official API. work mobile and web

@KiZakiXD
Copy link

I have just checked that now i am not getting response to list messages from the bank who are using official api. Seems this bug is temporary.

image btw this using official API. work mobile and web

api kok ditanya

@arskyy
Copy link

arskyy commented May 10, 2023

I have just checked that now i am not getting response to list messages from the bank who are using official api. Seems this bug is temporary.

image btw this using official API. work mobile and web

api kok ditanya

kamu hengker yah

@Fonnte
Copy link

Fonnte commented May 10, 2023

FYI, the maintainer have decided to put button feature as deprecated feature. The deprecation will be done in the future. This means the button will not be fixed anymore. It's time to say goodbye to the button feature from the library.

@arskyy
Copy link

arskyy commented May 10, 2023

After 5 votes from Contributors, Mods, and even Pedro himself, I've decided to begin the process of deleting Buttons and Lists. The patch that I released a few days ago was either under wraps or not widely applied for a long time (2 months) and the same day I posted it here it has been patched internally by WhatsApp. This timing is very fishy and to not irritate Meta even more, I drew this line. If you're a business, and you profit a lot from every conversion you make, you can go ahead and use the official Meta API for all I care. I've been working discreetly with other library leaders for about 50 hours total all together reverse engineering to figure this out (whatsmeowlead, whatsappweb4j, baileys, openwa and wppconnect) and after all our efforts nothing has worked out. This is what we really end up with in the end because depending on solution after solution whatever you build on top of it will fail. Like building a hospital on bamboo scaffolding. It takes a heavy heart to say this, I know. I also have a mountain of code to change now (Hypere, StormChat, and countless other partners and clients over the years). Open-wa, Baileys, whatsapp-web.js, and wppconnect will be deprecated keys. The process is slightly different for each library but in the end it will all be the same. - purpshell, maintainer of whatsapp-web.js and Baileys for 3 years now (in case you didn't know)

@lambangwi
Copy link

RIP #Buttons #List :(

@sembilan-d
Copy link

2, 2228, 8

Not work on ios
Im worked on Ios and Web using "version": [2, 2228, 8]

8d566099-c18b-43dc-ba2b-6322d24d6488

screenshot 118

In IOS Still working

@Auties00
Copy link
Collaborator

So I'm gonna have a look today.
Still even if i fix it, at this point you really shouldn't be relying on buttons.

@hosamalzagh
Copy link

same issue

@codemakesense07
Copy link

Same with me any Solution ?

No solution for now, but to appear on wa web you can still add the viewOnce parameter

yeah, the button can still be seen on your 'whatsapp web' but it's not sent to your mobile device... this issue hasn't been fixed for so long

@reski-rukmantiyo
Copy link

After 5 votes from Contributors, Mods, and even Pedro himself, I've decided to begin the process of deleting Buttons and Lists. The patch that I released a few days ago was either under wraps or not widely applied for a long time (2 months) and the same day I posted it here it has been patched internally by WhatsApp. This timing is very fishy and to not irritate Meta even more, I drew this line. If you're a business, and you profit a lot from every conversion you make, you can go ahead and use the official Meta API for all I care. I've been working discreetly with other library leaders for about 50 hours total all together reverse engineering to figure this out (whatsmeowlead, whatsappweb4j, baileys, openwa and wppconnect) and after all our efforts nothing has worked out. This is what we really end up with in the end because depending on solution after solution whatever you build on top of it will fail. Like building a hospital on bamboo scaffolding. It takes a heavy heart to say this, I know. I also have a mountain of code to change now (Hypere, StormChat, and countless other partners and clients over the years). Open-wa, Baileys, whatsapp-web.js, and wppconnect will be deprecated keys. The process is slightly different for each library but in the end it will all be the same. - purpshell, maintainer of whatsapp-web.js and Baileys for 3 years now (in case you didn't know)

hi @arskyy and teams, thanks for everything that you guys have done until this far. may i know, other than button and list, what else that dev will deprecate (other than on server side)? just precautions. thanks

@Auties00
Copy link
Collaborator

Auties00 commented May 13, 2023

I forgot to reply, but there's a server side filter now. So the issue cannot be solved. Btw only buttons, list and template are getting deprecated

@reski-rukmantiyo
Copy link

I forgot to be reply, but there's a server side filter now. So the issue cannot be solved. Btw only buttons, list and template are getting deprecated

thanks @Auties00 for clarifications.

@brekertabumi
Copy link

brekertabumi commented May 29, 2023

Same with me any Solution ?

No solution for now, but to appear on wa web you can still add the viewOnce parameter

How do you add the viewOnce parameter, can you give an example?

`const buttons = [
{buttonId: "id1", buttonText: {displayText: 'Info 1!'}},
{buttonId: "id2", buttonText: {displayText: 'Info 2!'}},
{buttonId: "id3", buttonText: {displayText: '💵 Info 3'}}
]

const buttonInfo = {
text: "Info Warung Kopi",
buttons: buttons,
viewOnce:true,
headerType: 1
}
await sock.sendMessage(noWa, buttonInfo, {quoted: messages[0]});`

@jefaokpta
Copy link

Press 'F'

@renatoiub
Copy link

I tested the buttons and the list again, they worked again on IOS.

@rajatency
Copy link

Is the buttons feature available now or not on WhatsApp? Is it available on WhatsApp Business?

@Fann-level-MAX
Copy link

you guys trying to do something like this?

20240731_010536
20240731_010629

@goziyyy
Copy link

goziyyy commented Aug 1, 2024

you guys trying to do something like this?

20240731_010536 20240731_010629

how? can u explain me?

@wahyuba05
Copy link

you guys trying to do something like this?

20240731_010536 20240731_010629

but in next version baileys,its not work again.right?

@Fann-level-MAX
Copy link

you guys trying to do something like this?
20240731_010536 20240731_010629

but in next version baileys,its not work again.right?

you guys trying to do something like this?
20240731_010536 20240731_010629

how? can u explain me?

i will give you my code later, I'm busy rn and my code was in my laptop

@goziyyy
Copy link

goziyyy commented Aug 1, 2024

y

okay

@Fann-level-MAX
Copy link

Fann-level-MAX commented Aug 1, 2024

okay

import pkg from "@whiskeysockets/baileys"
const { proto, generateWAMessageFromContent, generateWAMessageContent } = pkg

const generate = async (type, url) => {
    const generated = await generateWAMessageContent({
        [type]: { url }
    }, {
        upload: sock.waUploadToServer
    })
    return generated[`${type}Message`]
}

const msg = generateWAMessageFromContent(m.key.remoteJid, {
    viewOnceMessage: {
        message: {
            messageContextInfo: {
                deviceListMetadata: {},
                deviceListMetadataVersion: 2
            },
            interactiveMessage: proto.Message.InteractiveMessage.create({
                body: proto.Message.InteractiveMessage.Body.create({
                    text: "body text (optional)"
                }),
                footer: proto.Message.InteractiveMessage.Footer.create({
                    text: "footer text (optional)"
                }),
                header: proto.Message.InteractiveMessage.Header.create({
                    title: "some title",
                    hasMediaAttachment: true, // false if you don't want to send media with it
                    imageMessage: generate("image", "url/path to image"),
                    //videoMessage: generate("video", "url/path to video"), // if it's an video
                }),
                nativeFlowMessage: proto.Message.InteractiveMessage.NativeFlowMessage.create({
                    buttons: [{
                        name: "quick_reply",
                        buttonParamsJson: JSON.stringify({
                            display_text: "button 1", // <-- displayed text
                            id: ".menu" // <-- this is the id or you may call it command 🤷‍♂️
                        }) // REMEMBER TO USE "JSON.stringify()" BECAUSE "buttonParamsJson" ONLY ACCEPTING STIRNG JSON, NOT AN OBJECT
                    },{
                        name: "cta_url",
                        buttonParamsJson: JSON.stringify({
                            display_text: "subscribe my Youtube!",
                            url: "https://youtube.com/@fannmods",
                            merchant_url: "https://youtube.com"
                        })
                    }]
                })
            })
        }
    }
}, {})

await sock.relayMessage(msg.key.remoteJid, msg.message, {
    messageId: msg.key.id
})

this code should be worked

@hacxk
Copy link

hacxk commented Aug 1, 2024

okay

import pkg from "@whiskeysockets/baileys"
const { proto, generateWAMessageFromContent, generateWAMessageContent } = pkg

const generate = async (type, url) => {
    const generated = await generateWAMessageContent({
        [type]: { url }
    }, {
        upload: sock.waUploadToServer
    })
    return generated[`${type}Message`]
}

const msg = generateWAMessageFromContent(m.key.remoteJid, {
    viewOnceMessage: {
        message: {
            messageContextInfo: {
                deviceListMetadata: {},
                deviceListMetadataVersion: 2
            },
            interactiveMessage: proto.Message.InteractiveMessage.create({
                body: proto.Message.InteractiveMessage.Body.create({
                    text: "body text (optional)"
                }),
                footer: proto.Message.InteractiveMessage.Footer.create({
                    text: "footer text (optional)"
                }),
                header: proto.Message.InteractiveMessage.Header.create({
                    title: "some title",
                    hasMediaAttachment: true, // false if you don't want to send media with it
                    imageMessage: generate("image", "url/path to image"),
                    //videoMessage: generate("video", "url/path to video"), // if it's an video
                }),
                nativeFlowMessage: proto.Message.InteractiveMessage.NativeFlowMessage.create({
                    buttons: [{
                        name: "quick_reply",
                        buttonParamsJson: JSON.stringify({
                            display_text: "button 1", // <-- displayed text
                            id: ".menu" // <-- this is the id or you may call it command 🤷‍♂️
                        }) // REMEMBER TO USE "JSON.stringify()" BECAUSE "buttonParamsJson" ONLY ACCEPTING STIRNG JSON, NOT AN OBJECT
                    },{
                        name: "ctl_url",
                        buttonParamsJson: JSON.stringify({
                            display_text: "subscribe my Youtube!",
                            url: "https://youtube.com/@fannmods",
                            merchant_url: "https://youtube.com"
                        })
                    }]
                })
            })
        }
    }
}, {})

await sock.relayMessage(msg.key.remoteJid, msg.message, {
    messageId: msg.key.id
})

this code should be worked

But this will don't show in Web Whatsapp, IOS

@Fann-level-MAX
Copy link

But this will don't show in Web Whatsapp, IOS

they say old method of sending button message still work on IOS and Web
why didn't u just send 2 button?
my code for android and old method for ios and web

@wahyuba05
Copy link

But this will don't show in Web Whatsapp, IOS

they say old method of sending button message still work on IOS and Web why didn't u just send 2 button? my code for android and old method for ios and web

its still work for next update whiskeysocket baileys version?

@Fann-level-MAX
Copy link

its still work for next update whiskeysocket baileys version?

i have no idea
but probably yeah

@goziyyy
Copy link

goziyyy commented Aug 1, 2024

But this will don't show in Web Whatsapp, IOS

they say old method of sending button message still work on IOS and Web why didn't u just send 2 button? my code for android and old method for ios and web

Do u have an example code for the old method one? In my case i Gotta go for all of them to make sure all platform should work (is it possible¿)

@Fann-level-MAX
Copy link

Do u have an example code for the old method one? In my case i Gotta go for all of them to make sure all platform should work (is it possible¿)

i have tested my code and it worked for web

@G4br1e3l
Copy link

how to send sections?

okay

import pkg from "@whiskeysockets/baileys"
const { proto, generateWAMessageFromContent, generateWAMessageContent } = pkg

const generate = async (type, url) => {
    const generated = await generateWAMessageContent({
        [type]: { url }
    }, {
        upload: sock.waUploadToServer
    })
    return generated[`${type}Message`]
}

const msg = generateWAMessageFromContent(m.key.remoteJid, {
    viewOnceMessage: {
        message: {
            messageContextInfo: {
                deviceListMetadata: {},
                deviceListMetadataVersion: 2
            },
            interactiveMessage: proto.Message.InteractiveMessage.create({
                body: proto.Message.InteractiveMessage.Body.create({
                    text: "body text (optional)"
                }),
                footer: proto.Message.InteractiveMessage.Footer.create({
                    text: "footer text (optional)"
                }),
                header: proto.Message.InteractiveMessage.Header.create({
                    title: "some title",
                    hasMediaAttachment: true, // false if you don't want to send media with it
                    imageMessage: generate("image", "url/path to image"),
                    //videoMessage: generate("video", "url/path to video"), // if it's an video
                }),
                nativeFlowMessage: proto.Message.InteractiveMessage.NativeFlowMessage.create({
                    buttons: [{
                        name: "quick_reply",
                        buttonParamsJson: JSON.stringify({
                            display_text: "button 1", // <-- displayed text
                            id: ".menu" // <-- this is the id or you may call it command 🤷‍♂️
                        }) // REMEMBER TO USE "JSON.stringify()" BECAUSE "buttonParamsJson" ONLY ACCEPTING STIRNG JSON, NOT AN OBJECT
                    },{
                        name: "cta_url",
                        buttonParamsJson: JSON.stringify({
                            display_text: "subscribe my Youtube!",
                            url: "https://youtube.com/@fannmods",
                            merchant_url: "https://youtube.com"
                        })
                    }]
                })
            })
        }
    }
}, {})

await sock.relayMessage(msg.key.remoteJid, msg.message, {
    messageId: msg.key.id
})

this code should be worked

@Fann-level-MAX
Copy link

how to send sections?

let msg = generateWAMessageFromContent(m.key.remoteJid, {
    viewOnceMessage: {
      message: {
        "messageContextInfo": {
          "deviceListMetadata": {},
          "deviceListMetadataVersion": 2
        },
        interactiveMessage: proto.Message.InteractiveMessage.create({
          body: proto.Message.InteractiveMessage.Body.create({
            text: teks
          }),
          footer: proto.Message.InteractiveMessage.Footer.create({
            text: cright
          }),
          header: proto.Message.InteractiveMessage.Header.create({
            title: ``,
            videoMessage: await generate("image", { url: thumbnail }),
            hasMediaAttachment: true
          }),
          nativeFlowMessage: proto.Message.InteractiveMessage.NativeFlowMessage.create({
            buttons: [{
            name: "quick_reply",
            buttonParamsJson: JSON.stringify({
                display_text: "btn 1,
                id: "id 1
            })
        },{
            name: "quick_reply",
            buttonParamsJson: JSON.stringify({
                display_text: "btn 2",
                id: "id 2"
            })
        }]
          })
        })
      }
    }
  }, {
    ephemeraExpiration: 86400,
    quoted: m
  })

  await sock.relayMessage(msg.key.remoteJid, msg.message, {
    messageId: msg.key.id
  })

should be work

@yrizzz
Copy link

yrizzz commented Sep 4, 2024

okay

import pkg from "@whiskeysockets/baileys"
const { proto, generateWAMessageFromContent, generateWAMessageContent } = pkg

const generate = async (type, url) => {
    const generated = await generateWAMessageContent({
        [type]: { url }
    }, {
        upload: sock.waUploadToServer
    })
    return generated[`${type}Message`]
}

const msg = generateWAMessageFromContent(m.key.remoteJid, {
    viewOnceMessage: {
        message: {
            messageContextInfo: {
                deviceListMetadata: {},
                deviceListMetadataVersion: 2
            },
            interactiveMessage: proto.Message.InteractiveMessage.create({
                body: proto.Message.InteractiveMessage.Body.create({
                    text: "body text (optional)"
                }),
                footer: proto.Message.InteractiveMessage.Footer.create({
                    text: "footer text (optional)"
                }),
                header: proto.Message.InteractiveMessage.Header.create({
                    title: "some title",
                    hasMediaAttachment: true, // false if you don't want to send media with it
                    imageMessage: generate("image", "url/path to image"),
                    //videoMessage: generate("video", "url/path to video"), // if it's an video
                }),
                nativeFlowMessage: proto.Message.InteractiveMessage.NativeFlowMessage.create({
                    buttons: [{
                        name: "quick_reply",
                        buttonParamsJson: JSON.stringify({
                            display_text: "button 1", // <-- displayed text
                            id: ".menu" // <-- this is the id or you may call it command 🤷‍♂️
                        }) // REMEMBER TO USE "JSON.stringify()" BECAUSE "buttonParamsJson" ONLY ACCEPTING STIRNG JSON, NOT AN OBJECT
                    },{
                        name: "cta_url",
                        buttonParamsJson: JSON.stringify({
                            display_text: "subscribe my Youtube!",
                            url: "https://youtube.com/@fannmods",
                            merchant_url: "https://youtube.com"
                        })
                    }]
                })
            })
        }
    }
}, {})

await sock.relayMessage(msg.key.remoteJid, msg.message, {
    messageId: msg.key.id
})

this code should be worked

how to get params inside button [] or where documentation for buttonParamsJson ?

@Rmgs06
Copy link

Rmgs06 commented Sep 28, 2024

Apakah Anda punya contoh kode untuk metode lama? Dalam kasus saya, saya harus menggunakan semuanya untuk memastikan semua platform berfungsi (apakah mungkin¿)

Saya telah menguji kode saya dan berhasil untuk web

I've tried it but the results are different if I use WhatsApp web or desktop

this is my result

  • in web
    wabug

  • in mobile
    WhatsApp Image 2024-09-28 at 10 09 11

I don't know what's wrong.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests