mirror of
https://git.kescher.at/CatCatNya/catstodon.git
synced 2024-11-23 18:08:06 +01:00
80e02b90e4
Filters out hidden stream entries from Atom feed Blocks now generate hidden stream entries, can be used to federate blocks Private statuses cannot be reblogged (generates generic 422 error for now) POST /api/v1/statuses now takes visibility=(public|unlisted|private) param instead of unlisted boolean Statuses JSON now contains visibility=(public|unlisted|private) field
37 lines
490 B
Ruby
37 lines
490 B
Ruby
# frozen_string_literal: true
|
|
|
|
module Streamable
|
|
extend ActiveSupport::Concern
|
|
|
|
included do
|
|
has_one :stream_entry, as: :activity
|
|
|
|
def title
|
|
super
|
|
end
|
|
|
|
def content
|
|
title
|
|
end
|
|
|
|
def target
|
|
super
|
|
end
|
|
|
|
def object_type
|
|
:activity
|
|
end
|
|
|
|
def thread
|
|
super
|
|
end
|
|
|
|
def hidden?
|
|
false
|
|
end
|
|
|
|
after_create do
|
|
account.stream_entries.create!(activity: self, hidden: hidden?) if account.local?
|
|
end
|
|
end
|
|
end
|