From e17d779fb388f4f5b3759a9fbb4b59fd1dc1dbf6 Mon Sep 17 00:00:00 2001 From: Ross Miller Date: Sat, 21 May 2022 17:21:33 -0500 Subject: [PATCH] Fix #31: Calling sendTextMessage after sending MMS causes message to be incorrectly sent as MMS --- lib/MessageApiClient.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/MessageApiClient.ts b/lib/MessageApiClient.ts index ff70961..3f49580 100644 --- a/lib/MessageApiClient.ts +++ b/lib/MessageApiClient.ts @@ -51,10 +51,12 @@ export class MessageApiClient { * For Twitter: use the Twitter Snowflake ID of the account you want to use as sender. * @param message the body of the SMS message to be sent * @param reference (optional) reference to the message to query it later in the CM.platform. - */public sendTextMessage(to: string[], from: string, message: string, reference: string = undefined) { + */ + public sendTextMessage(to: string[], from: string, message: string, reference: string = undefined) { return this .createMessage() .setMessage(to, from, message, reference) + .setAllowedChannels(['SMS']) .send(); } }