2019-03-03 22:18:23 +01:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
class ActivityPub::FetchRemotePollService < BaseService
|
|
|
|
include JsonLdHelper
|
|
|
|
|
|
|
|
def call(poll, on_behalf_of = nil)
|
2019-03-11 00:49:31 +01:00
|
|
|
json = fetch_resource(poll.status.uri, true, on_behalf_of)
|
2019-07-09 03:27:35 +02:00
|
|
|
|
2019-03-21 14:24:09 +01:00
|
|
|
return unless supported_context?(json)
|
2019-07-09 03:27:35 +02:00
|
|
|
|
2022-01-19 22:37:27 +01:00
|
|
|
ActivityPub::ProcessStatusUpdateService.new.call(poll.status, json)
|
2019-03-03 22:18:23 +01:00
|
|
|
end
|
|
|
|
end
|