about summary refs log tree commit diff
path: root/app/lib/ostatus/activity/general.rb
blob: 8a6aabc3372edb36b0d68bf12f47cd0c2a53b7b9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# frozen_string_literal: true

class OStatus::Activity::General < OStatus::Activity::Base
  def specialize
    special_class&.new(@xml, @account, @options)
  end

  private

  def special_class
    case verb
    when :post
      OStatus::Activity::Post
    when :share
      OStatus::Activity::Share
    when :delete
      OStatus::Activity::Deletion
    end
  end
end