diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2016-03-27 23:51:18 +0200 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2016-03-27 23:51:18 +0200 |
commit | c38ad208c361cc77e2fa305a0e929f35363c0fcd (patch) | |
tree | 74cd611c7c59e8ffb57747b1db0530d6ca9edc0b /app | |
parent | 039e6f951ca16bd4183fb29d782dd095d2b4120a (diff) |
Fix mentions regex to exclude usernames in Medium URLs
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 007fc77b6..f61f4c765 100644 --- a/app/models/account.rb +++ b/app/models/account.rb @@ -31,7 +31,7 @@ class Account < ActiveRecord::Base has_many :following, through: :active_relationships, source: :target_account has_many :followers, through: :passive_relationships, source: :account - MENTION_RE = /(?:^|\W)@([a-z0-9_]+(?:@[a-z0-9\.\-]+)?)/i + MENTION_RE = /(?:^|\s|\.)@([a-z0-9_]+(?:@[a-z0-9\.\-]+)?)/i def follow!(other_account) self.active_relationships.where(target_account: other_account).first_or_create!(target_account: other_account) |