Fix MENTION_RE to not match nil usernames (#6862)
parent
692d03239b
commit
7d7a725e82
|
@ -48,7 +48,7 @@
|
|||
|
||||
class Account < ApplicationRecord
|
||||
USERNAME_RE = /[a-z0-9_]+([a-z0-9_\.]+[a-z0-9_]+)?/i
|
||||
MENTION_RE = /(?<=^|[^\/[:word:]])@((#{USERNAME_RE}?)(?:@[a-z0-9\.\-]+[a-z0-9]+)?)/i
|
||||
MENTION_RE = /(?<=^|[^\/[:word:]])@((#{USERNAME_RE})(?:@[a-z0-9\.\-]+[a-z0-9]+)?)/i
|
||||
|
||||
include AccountAvatar
|
||||
include AccountFinderConcern
|
||||
|
|
Loading…
Reference in New Issue