Add service for posting statuses (normal and replies), mention regex to
fetch webfinger information of mentioned accounts
This commit is contained in:
parent
8da8387afe
commit
79609d6270
3 changed files with 32 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue