Fix unfollows

This commit is contained in:
Eugen Rochko 2016-03-16 21:14:39 +01:00
parent 9cb690c706
commit 086d487145
3 changed files with 5 additions and 3 deletions

View file

@ -21,6 +21,8 @@ class ProcessInteractionService < BaseService
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)
@ -48,7 +50,7 @@ class ProcessInteractionService < BaseService
end
def verb(xml)
xml.at_xpath('//activity:verb').content.gsub('http://activitystrea.ms/schema/1.0/', '').to_sym
xml.at_xpath('//activity:verb').content.gsub('http://activitystrea.ms/schema/1.0/', '').gsub('http://ostatus.org/schema/1.0/', '').to_sym
rescue
:post
end