about summary refs log tree commit diff
path: root/app/models/account.rb
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2016-02-24 18:25:04 +0100
committerEugen Rochko <eugen@zeonfederated.com>2016-02-24 18:25:04 +0100
commit79609d62705fa7060c1d1ab78234b4aabdbd7e0f (patch)
tree12cef6a016a9052fdfb0d39ac10df8eab55d46a3 /app/models/account.rb
parent8da8387afee66e17b3ec864ba84a7a065187818b (diff)
Add service for posting statuses (normal and replies), mention regex to
fetch webfinger information of mentioned accounts
Diffstat (limited to 'app/models/account.rb')
-rw-r--r--app/models/account.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/models/account.rb b/app/models/account.rb
index 66345b5ab..2cbec488b 100644
--- a/app/models/account.rb
+++ b/app/models/account.rb
@@ -14,6 +14,8 @@ 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
+
   def follow!(other_account)
     self.active_relationships.first_or_create!(target_account: other_account)
   end