Browse Source

Fixing small bug with FollowRemoteAccountService usage

closed-social-glitch-2
Eugen Rochko 8 years ago
parent
commit
d022975444
3 changed files with 3 additions and 5 deletions
  1. +1
    -1
      app/services/process_feed_service.rb
  2. +1
    -3
      app/services/process_interaction_service.rb
  3. +1
    -1
      app/services/process_mentions_service.rb

+ 1
- 1
app/services/process_feed_service.rb View File

@ -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

+ 1
- 3
app/services/process_interaction_service.rb View File

@ -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)

+ 1
- 1
app/services/process_mentions_service.rb View File

@ -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)

Loading…
Cancel
Save