Repository: pedroslopez/whatsapp-web.js
File: src/util/Injected.js (JavaScript)

Code before:
                        displayText: button.urlButton?.displayText || '',
                        url: button.urlButton?.url,
                        subtype: 'url'
                    });
                } else if (button.callButton) {
                    return new window.Store.TemplateButtonModel({
                        id: buttonIndex,
                        displayText: button.callButton?.displayText,
                        phoneNumber: button.callButton?.phoneNumber,
                        subtype: 'call'
                    });
                } else {
                    return new window.Store.TemplateButtonModel({
                        id: buttonIndex,
                        displayText: button.quickReplyButton?.displayText,
                        selectionId: button.quickReplyButton?.id,
                        subtype: 'quick_reply'
                    });
                }
            }));
        }
        else {
            returnObject.isDynamicReplyButtonsMsg = true;

            returnObject.dynamicReplyButtons = buttonsOptions.buttons.map((button, index) => ({
                buttonId: button.quickReplyButton.id || `${index}`,
                buttonText: {displayText: button.quickReplyButton?.displayText},
                type: 1,
            }));

            // For UI only
            returnObject.replyButtons = new window.Store.ButtonCollection();
            returnObject.replyButtons.add(returnObject.dynamicReplyButtons.map((button) => new window.Store.ReplyButtonModel({
                id: button.buttonId,
                displayText: button.buttonText?.displayText || undefined,
            })));

        }
        return returnObject;
    };

    window.WWebJS.sendMessage = async (chat, content, options = {}) => {
        let attOptions = {};
        if (options.attachment) {
            attOptions = options.sendMediaAsSticker
                ? await window.WWebJS.processStickerData(options.attachment)
                : await window.WWebJS.processMediaData(options.attachment, {
                    forceVoice: options.sendAudioAsVoice,
                    forceDocument: options.sendMediaAsDocument,
                    forceGif: options.sendVideoAsGif
                });

Review comment (suggestion):
```suggestion
                buttonId: button.quickReplyButton.id.toString() || `${index}`,
```

Code after:
                        displayText: button.urlButton?.displayText || '',
                        url: button.urlButton?.url,
                        subtype: 'url'
                    });
                } else if (button.callButton) {
                    return new window.Store.TemplateButtonModel({
                        id: buttonIndex,
                        displayText: button.callButton?.displayText,
                        phoneNumber: button.callButton?.phoneNumber,
                        subtype: 'call'
                    });
                } else {
                    return new window.Store.TemplateButtonModel({
                        id: buttonIndex,
                        displayText: button.quickReplyButton?.displayText,
                        selectionId: button.quickReplyButton?.id,
                        subtype: 'quick_reply'
                    });
                }
            }));
        }
        else {
            returnObject.isDynamicReplyButtonsMsg = true;

            returnObject.dynamicReplyButtons = buttonsOptions.buttons.map((button, index) => ({
                buttonId: button.quickReplyButton.id.toString() || `${index}`,
                buttonText: {displayText: button.quickReplyButton?.displayText},
                type: 1,
            }));

            // For UI only
            returnObject.replyButtons = new window.Store.ButtonCollection();
            returnObject.replyButtons.add(returnObject.dynamicReplyButtons.map((button) => new window.Store.ReplyButtonModel({
                id: button.buttonId,
                displayText: button.buttonText?.displayText || undefined,
            })));

        }
        return returnObject;
    };

    window.WWebJS.sendMessage = async (chat, content, options = {}) => {
        let attOptions = {};
        if (options.attachment) {
            attOptions = options.sendMediaAsSticker
                ? await window.WWebJS.processStickerData(options.attachment)
                : await window.WWebJS.processMediaData(options.attachment, {
                    forceVoice: options.sendAudioAsVoice,
                    forceDocument: options.sendMediaAsDocument,
                    forceGif: options.sendVideoAsGif
                });