about summary refs log tree commit diff
path: root/app/services/activitypub/fetch_remote_poll_service.rb
blob: 854a32d050a75e0d0e9f58e804556de873ab5526 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
# frozen_string_literal: true

class ActivityPub::FetchRemotePollService < BaseService
  include JsonLdHelper

  def call(poll, on_behalf_of = nil)
    json = fetch_resource(poll.status.uri, true, on_behalf_of)
    return unless supported_context?(json)
    ActivityPub::ProcessPollService.new.call(poll, json)
  end
end