attempted fix. Buttons are broken, lists are working

This commit is contained in:
purpshell
2022-08-10 13:54:27 +03:00
parent b1693b49e0
commit 81111faa05
2 changed files with 57 additions and 4 deletions

View File

@@ -73,7 +73,11 @@ 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 ? String(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
};
});
}