闭社主体 forked from https://github.com/tootsuite/mastodon
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
369 B

  1. # frozen_string_literal: true
  2. class OStatus::Activity::General < OStatus::Activity::Base
  3. def specialize
  4. special_class&.new(@xml, @account, @options)
  5. end
  6. private
  7. def special_class
  8. case verb
  9. when :post
  10. OStatus::Activity::Post
  11. when :share
  12. OStatus::Activity::Share
  13. when :delete
  14. OStatus::Activity::Deletion
  15. end
  16. end
  17. end