bugfixes; email parsing; send emails into matrix rooms; e2e tests

This commit is contained in:
Aine
2022-08-22 12:28:29 +03:00
parent c746c91dbb
commit e6d5e81efe
16 changed files with 428 additions and 24 deletions

15
utils/utils.go Normal file
View File

@@ -0,0 +1,15 @@
package utils
import "strings"
func Mailbox(email string) string {
index := strings.LastIndex(email, "@")
if index == -1 {
return email
}
return email[:strings.LastIndex(email, "@")]
}
func Hostname(email string) string {
return email[strings.LastIndex(email, "@")+1:]
}