Adding Turbolinks, adding status posting form on homepage

This commit is contained in:
Eugen Rochko 2016-03-21 18:26:47 +01:00
parent c28971c70c
commit f14f462eaf
14 changed files with 104 additions and 2 deletions

View file

@ -7,7 +7,10 @@ class FollowRemoteAccountService < BaseService
# @return [Account]
def call(uri, subscribe = true)
username, domain = uri.split('@')
account = Account.where(username: username, domain: domain).first
return Account.find_local(username) if domain == Rails.configuration.x.local_domain
account = Account.find_by(username: username, domain: domain)
if account.nil?
account = Account.new(username: username, domain: domain)