feat: add email fallback / continutiy inbox feature for live chat inbox

This commit is contained in:
Abhinav Raut
2025-09-21 00:51:19 +05:30
parent ed448055ed
commit d7067bce7d
18 changed files with 757 additions and 67 deletions
+7
View File
@@ -23,6 +23,7 @@ const (
var (
regexpNonAlNum = regexp.MustCompile(`[^a-zA-Z0-9\-_\.]+`)
regexpSpaces = regexp.MustCompile(`[\s]+`)
uuidV4Regex = regexp.MustCompile(`[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-4[a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}`)
)
// HTML2Text converts HTML to text.
@@ -256,3 +257,9 @@ func ComputeRecipients(
return
}
// ExtractUUID finds and returns the first valid UUID v4 in the given text.
// Returns empty string if no valid UUID is found.
func ExtractUUID(text string) string {
return uuidV4Regex.FindString(text)
}