Skip to content

Commit a59ff37

Browse files
committed
Minor adjustments
1 parent 65de8ba commit a59ff37

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

components/trengo/actions/send-a-whatsapp-message-template/send-a-whatsapp-message-template.mjs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ export default {
4545
},
4646
async run ({ $ }) {
4747
if (!this.recepientPhoneNumber && !this.ticketId) {
48-
throw new ConfigurationError("Either `Receipent Phone Number` or `Ticket ID` should be set!");
48+
throw new ConfigurationError("Either `Recipient Phone Number` or `Ticket ID` should be set!");
4949
}
5050
const params = [];
5151
if (this.whatsappTemplateParamsKeys && this.whatsappTemplateParamsValues) {
@@ -65,7 +65,8 @@ export default {
6565
data: {
6666
recipient_phone_number: this.recepientPhoneNumber,
6767
hsm_id: this.hsmId,
68-
ticket_id: this.ticketId,
68+
// the docs specify this as string for some reason
69+
ticket_id: this.ticketId?.toString?.() || this.ticketId,
6970
params,
7071
},
7172
});

0 commit comments

Comments
 (0)