From d0229754442dc824dc38bf99344052b3931998f8 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Wed, 16 Mar 2016 21:20:50 +0100 Subject: [PATCH] Fixing small bug with FollowRemoteAccountService usage --- app/services/process_feed_service.rb | 2 +- app/services/process_interaction_service.rb | 4 +--- app/services/process_mentions_service.rb | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/app/services/process_feed_service.rb b/app/services/process_feed_service.rb index 605f615fdff..8962603cf71 100644 --- a/app/services/process_feed_service.rb +++ b/app/services/process_feed_service.rb @@ -98,7 +98,7 @@ class ProcessFeedService < BaseService account = Account.find_by(username: username, domain: domain) 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? end diff --git a/app/services/process_interaction_service.rb b/app/services/process_interaction_service.rb index 877647bbe93..43c8ca4fde8 100644 --- a/app/services/process_interaction_service.rb +++ b/app/services/process_interaction_service.rb @@ -14,15 +14,13 @@ class ProcessInteractionService < BaseService account = Account.find_by(username: username, domain: domain) if account.nil? - account = follow_remote_account_service.("acct:#{username}@#{domain}", false) + account = follow_remote_account_service.("#{username}@#{domain}", false) return if account.nil? end if salmon.verify(envelope, account.keypair) update_remote_profile_service.(xml.at_xpath('/xmlns:entry/xmlns:author'), account) - binding.pry - case verb(xml) when :follow follow!(account, target_account) diff --git a/app/services/process_mentions_service.rb b/app/services/process_mentions_service.rb index e1fc2f03869..760fdcf15dd 100644 --- a/app/services/process_mentions_service.rb +++ b/app/services/process_mentions_service.rb @@ -11,7 +11,7 @@ class ProcessMentionsService < BaseService mentioned_account = Account.find_by(username: username, domain: domain) if mentioned_account.nil? - mentioned_account = follow_remote_account_service.("acct:#{match.first}") + mentioned_account = follow_remote_account_service.("#{match.first}") end mentioned_account.mentions.first_or_create(status: status)