diff options
author | ThibG <thib@sitedethib.com> | 2018-03-22 10:45:48 +0100 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2018-03-22 10:45:48 +0100 |
commit | 6f531d140b8398a4680567934fe66cb0ca465fbc (patch) | |
tree | d12d409f1b04b438b5007414a0e8adb88db852f2 /app | |
parent | f66a7860291e6b2fef1844b580c22296dbad9202 (diff) |
Fix MENTION_RE to not match nil usernames (#6862)
Diffstat (limited to 'app')
-rw-r--r-- | app/models/account.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/account.rb b/app/models/account.rb index 14269860f..c88c6ec44 100644 --- a/app/models/account.rb +++ b/app/models/account.rb @@ -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 |