mastodon with modifications for is.nota.live
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.

streamable.rb 436B

123456789101112131415161718192021222324252627282930313233
  1. # frozen_string_literal: true
  2. module Streamable
  3. extend ActiveSupport::Concern
  4. included do
  5. has_one :stream_entry, as: :activity
  6. def title
  7. super
  8. end
  9. def content
  10. title
  11. end
  12. def target
  13. super
  14. end
  15. def object_type
  16. :activity
  17. end
  18. def thread
  19. super
  20. end
  21. after_create do
  22. account.stream_entries.create!(activity: self) if account.local?
  23. end
  24. end
  25. end