mirror of
https://github.com/lingble/chatwoot.git
synced 2025-11-02 03:57:52 +00:00
fix: "wa_source_id" function return value (#5451)
- Fix contact inbox builder returning invalid WhatsApp source id - Add specs to cover source id validations Co-authored-by: Sojan Jose <sojan@pepalo.com>
This commit is contained in:
@@ -6,4 +6,8 @@ module RegexHelper
|
||||
# shouldn't start with a underscore or hyphen
|
||||
UNICODE_CHARACTER_NUMBER_HYPHEN_UNDERSCORE = Regexp.new('\A[\p{L}\p{N}]+[\p{L}\p{N}_-]+\Z')
|
||||
MENTION_REGEX = Regexp.new('\[(@[\w_. ]+)\]\(mention://(?:user|team)/\d+/(.*?)+\)')
|
||||
|
||||
TWILIO_CHANNEL_SMS_REGEX = Regexp.new('^\+\d{1,14}\z')
|
||||
TWILIO_CHANNEL_WHATSAPP_REGEX = Regexp.new('^whatsapp:\+\d{1,14}\z')
|
||||
WHATSAPP_CHANNEL_REGEX = Regexp.new('^\d{1,14}\z')
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user