mirror of
https://github.com/cheveguerra/whatsapp-web.js.git
synced 2026-04-17 19:26:20 +00:00
fix: convert button ids to string
This commit is contained in:
@@ -59,7 +59,7 @@ class Buttons {
|
||||
_format(buttons){
|
||||
buttons = buttons.slice(0,3); // phone users can only see 3 buttons, so lets limit this
|
||||
return buttons.map((btn) => {
|
||||
return {'buttonId':btn.id ? btn.id : Util.generateHash(6),'buttonText':{'displayText':btn.body},'type':1};
|
||||
return {'buttonId':btn.id ? String(btn.id) : Util.generateHash(6),'buttonText':{'displayText':btn.body},'type':1};
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user