diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2016-02-23 19:17:37 +0100 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2016-02-23 19:17:37 +0100 |
commit | fa33750105389110a3395ca19167f789d21a149e (patch) | |
tree | 4b121a067ad46be5189301a2e3e3b2bcef8d6426 /app/services | |
parent | 3b0bc18db928c455186273d9b9aa5b96d91e035e (diff) |
Adding reblogs, favourites, improving atom generation
Diffstat (limited to 'app/services')
-rw-r--r-- | app/services/follow_remote_account_service.rb | 1 | ||||
-rw-r--r-- | app/services/process_interaction_service.rb | 6 |
2 files changed, 4 insertions, 3 deletions
diff --git a/app/services/follow_remote_account_service.rb b/app/services/follow_remote_account_service.rb index bd3c760d7..405d6c62e 100644 --- a/app/services/follow_remote_account_service.rb +++ b/app/services/follow_remote_account_service.rb @@ -15,6 +15,7 @@ class FollowRemoteAccountService account.remote_url = data.link('http://schemas.google.com/g/2010#updates-from').href account.salmon_url = data.link('salmon').href + account.url = data.link('http://webfinger.net/rel/profile-page').href account.public_key = magic_key_to_pem(data.link('magic-public-key').href) account.private_key = nil diff --git a/app/services/process_interaction_service.rb b/app/services/process_interaction_service.rb index 6f9b7cf73..dd9e76956 100644 --- a/app/services/process_interaction_service.rb +++ b/app/services/process_interaction_service.rb @@ -3,10 +3,10 @@ class ProcessInteractionService body = salmon.unpack(envelope) xml = Nokogiri::XML(body) - return if !involves_target_account(xml, target_account) || xml.at_xpath('//author/name').nil? || xml.at_xpath('//author/uri').nil? + return if !involves_target_account(xml, target_account) || xml.at_xpath('//xmlns:author/xmlns:name').nil? || xml.at_xpath('//xmlns:author/xmlns:uri').nil? - username = xml.at_xpath('//author/name').content - url = xml.at_xpath('//author/uri').content + username = xml.at_xpath('//xmlns:author/xmlns:name').content + url = xml.at_xpath('//xmlns:author/xmlns:uri').content domain = Addressable::URI.parse(url).host account = Account.find_by(username: username, domain: domain) |