Skip to content

Commit

Permalink
Update send-buttons.js
Browse files Browse the repository at this point in the history
  • Loading branch information
Fredwuz authored Sep 17, 2021
1 parent a0e3193 commit b85c4fd
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/lib/wapi/functions/send-buttons.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,12 @@ export async function sendButtons(to, title, buttons, subtitle) {
'passed string value in displayText'
);
}
buttons[index].buttonId = `id${index}`;
buttons[index].type = 1;
if(!buttons[index].buttonId) {
buttons[index].buttonId = `id${index}`;
}
if(!buttons[index].type ) {
buttons[index].type = 1;
}
}
}
}
Expand Down

0 comments on commit b85c4fd

Please sign in to comment.