fix: Add validation on the message length in Vue (#2209)

Co-authored-by: Nithin David Thomas <webofnithin@gmail.com>
This commit is contained in:
Pranav Raj S 2021-05-04 19:31:00 +05:30 committed by GitHub
parent 8459d09b6a
commit 35f0fba51d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View file

@ -186,10 +186,12 @@ export default {
if (this.isPrivate) {
return MESSAGE_MAX_LENGTH.GENERAL;
}
if (this.isAFacebookInbox) {
return MESSAGE_MAX_LENGTH.FACEBOOK;
}
if (this.isATwilioWhatsappChannel) {
return MESSAGE_MAX_LENGTH.TWILIO_WHATSAPP;
}
if (this.isATwilioSMSChannel) {
return MESSAGE_MAX_LENGTH.TWILIO_SMS;
}

View file

@ -6,5 +6,6 @@ export const MESSAGE_MAX_LENGTH = {
GENERAL: 10000,
FACEBOOK: 640,
TWILIO_SMS: 160,
TWILIO_WHATSAPP: 1600,
TWEET: 280,
};