chore: Audit message characters across all channels (#11343)

- Audited message characters across all channels.
- Replaced `isAInstagramChannel` with `isAnInstagramChannel`
This commit is contained in:
Muhsin Keloth
2025-04-21 14:46:51 +05:30
committed by GitHub
parent 1531772365
commit 0a394e16ca
8 changed files with 42 additions and 18 deletions

View File

@@ -4,8 +4,20 @@ export const isASubmittedFormMessage = (message = {}) =>
export const MESSAGE_MAX_LENGTH = {
GENERAL: 10000,
FACEBOOK: 1000,
// https://developers.facebook.com/docs/messenger-platform/reference/send-api#request
FACEBOOK: 2000,
// https://developers.facebook.com/docs/instagram-platform/instagram-api-with-instagram-login/messaging-api#send-a-text-message
INSTAGRAM: 1000,
// https://www.twilio.com/docs/glossary/what-sms-character-limit
TWILIO_SMS: 320,
// https://help.twilio.com/articles/360033806753-Maximum-Message-Length-with-Twilio-Programmable-Messaging
TWILIO_WHATSAPP: 1600,
// https://developers.facebook.com/docs/whatsapp/cloud-api/reference/messages#text-object
WHATSAPP_CLOUD: 4096,
// https://support.bandwidth.com/hc/en-us/articles/360010235373-What-are-Bandwidth-s-SMS-character-limits-and-concatenation-practices
BANDWIDTH_SMS: 160,
// https://core.telegram.org/bots/api#sendmessage
TELEGRAM: 4096,
LINE: 2000,
EMAIL: 25000,
};

View File

@@ -121,7 +121,7 @@ export default {
this.isATwilioWhatsAppChannel
);
},
isAInstagramChannel() {
isAnInstagramChannel() {
return this.channelType === INBOX_TYPES.INSTAGRAM;
},
},