update mentionName regex

recognize instance accounts
This commit is contained in:
tsmethurst 2022-06-02 13:38:56 +02:00
parent c0ab7f5d69
commit 2f1b638357

View file

@ -61,7 +61,7 @@ var (
return rgx
}()
mentionName = `^@(\w+)(?:@([a-zA-Z0-9_\-\.:]+))?$`
mentionName = `^@([\w\-\.]+)(?:@([\w\-\.:]+))?$`
// MentionName captures the username and domain part from a mention string
// such as @whatever_user@example.org, returning whatever_user and example.org (without the @ symbols)
MentionName = regexp.MustCompile(mentionName)