2019-03-03 15:18:23 -06:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
class ActivityPub::FetchRemotePollService < BaseService
|
|
|
|
include JsonLdHelper
|
|
|
|
|
|
|
|
def call(poll, on_behalf_of = nil)
|
2019-03-10 18:49:31 -05:00
|
|
|
json = fetch_resource(poll.status.uri, true, on_behalf_of)
|
2019-07-08 20:27:35 -05:00
|
|
|
|
2019-03-21 08:24:09 -05:00
|
|
|
return unless supported_context?(json)
|
2019-07-08 20:27:35 -05:00
|
|
|
|
2019-03-10 18:49:31 -05:00
|
|
|
ActivityPub::ProcessPollService.new.call(poll, json)
|
2019-03-03 15:18:23 -06:00
|
|
|
end
|
|
|
|
end
|