about summary refs log tree commit diff
path: root/app/services/activitypub/fetch_remote_poll_service.rb
blob: 1c79ecf1162f6e2d7b4c97ab0bbad9ad71e208d8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
# 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