2017-07-18 17:39:47 +03:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2017-07-19 02:37:26 +03:00
|
|
|
class OStatus::Activity::General < OStatus::Activity::Base
|
2017-07-18 17:39:47 +03:00
|
|
|
def specialize
|
2017-10-08 18:34:34 +03:00
|
|
|
special_class&.new(@xml, @account, @options)
|
2017-07-18 17:39:47 +03:00
|
|
|
end
|
|
|
|
|
|
|
|
private
|
|
|
|
|
|
|
|
def special_class
|
|
|
|
case verb
|
|
|
|
when :post
|
2017-07-19 02:37:26 +03:00
|
|
|
OStatus::Activity::Post
|
2017-07-18 17:39:47 +03:00
|
|
|
when :share
|
2017-07-19 02:37:26 +03:00
|
|
|
OStatus::Activity::Share
|
2017-07-18 17:39:47 +03:00
|
|
|
when :delete
|
2017-07-19 02:37:26 +03:00
|
|
|
OStatus::Activity::Deletion
|
2017-07-18 17:39:47 +03:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|