Fixing small bug with FollowRemoteAccountService usage
parent
086d487145
commit
d022975444
|
@ -98,7 +98,7 @@ class ProcessFeedService < BaseService
|
||||||
account = Account.find_by(username: username, domain: domain)
|
account = Account.find_by(username: username, domain: domain)
|
||||||
|
|
||||||
if account.nil?
|
if account.nil?
|
||||||
account = follow_remote_account_service.("acct:#{username}@#{domain}", false)
|
account = follow_remote_account_service.("#{username}@#{domain}", false)
|
||||||
return nil if account.nil?
|
return nil if account.nil?
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -14,15 +14,13 @@ class ProcessInteractionService < BaseService
|
||||||
account = Account.find_by(username: username, domain: domain)
|
account = Account.find_by(username: username, domain: domain)
|
||||||
|
|
||||||
if account.nil?
|
if account.nil?
|
||||||
account = follow_remote_account_service.("acct:#{username}@#{domain}", false)
|
account = follow_remote_account_service.("#{username}@#{domain}", false)
|
||||||
return if account.nil?
|
return if account.nil?
|
||||||
end
|
end
|
||||||
|
|
||||||
if salmon.verify(envelope, account.keypair)
|
if salmon.verify(envelope, account.keypair)
|
||||||
update_remote_profile_service.(xml.at_xpath('/xmlns:entry/xmlns:author'), account)
|
update_remote_profile_service.(xml.at_xpath('/xmlns:entry/xmlns:author'), account)
|
||||||
|
|
||||||
binding.pry
|
|
||||||
|
|
||||||
case verb(xml)
|
case verb(xml)
|
||||||
when :follow
|
when :follow
|
||||||
follow!(account, target_account)
|
follow!(account, target_account)
|
||||||
|
|
|
@ -11,7 +11,7 @@ class ProcessMentionsService < BaseService
|
||||||
mentioned_account = Account.find_by(username: username, domain: domain)
|
mentioned_account = Account.find_by(username: username, domain: domain)
|
||||||
|
|
||||||
if mentioned_account.nil?
|
if mentioned_account.nil?
|
||||||
mentioned_account = follow_remote_account_service.("acct:#{match.first}")
|
mentioned_account = follow_remote_account_service.("#{match.first}")
|
||||||
end
|
end
|
||||||
|
|
||||||
mentioned_account.mentions.first_or_create(status: status)
|
mentioned_account.mentions.first_or_create(status: status)
|
||||||
|
|
Reference in New Issue