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