mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-10-29 09:42:26 -05:00
fix mention extracting when no domain exists (usually intra-instance mentions) (#272)
* fix mention extracting when no domain exists (usually when intra-instance mentions) Signed-off-by: kim <grufwub@gmail.com> * fix search logic to match new mention matching logic Signed-off-by: kim <grufwub@gmail.com> * appease the linter :p Signed-off-by: kim <grufwub@gmail.com>
This commit is contained in:
parent
15621f5324
commit
7e4c3fa5c7
4 changed files with 23 additions and 35 deletions
|
|
@ -47,7 +47,7 @@ const (
|
|||
)
|
||||
|
||||
var (
|
||||
mentionName = `^@(\w+)(?:@([a-zA-Z0-9_\-\.:]+)?)$`
|
||||
mentionName = `^@(\w+)(?:@([a-zA-Z0-9_\-\.:]+))?$`
|
||||
// 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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue