Add support for editing for published statuses (#16697)
* Add support for editing for published statuses * Fix references to stripped-out code * Various fixes and improvements * Further fixes and improvements * Fix updates being potentially sent to unauthorized recipients * Various fixes and improvements * Fix wrong words in test * Fix notifying accounts that were tagged but were not in the audience * Fix mistake
This commit is contained in:
parent
2d1f082bb6
commit
1060666c58
56 changed files with 1415 additions and 574 deletions
|
@ -11,6 +11,7 @@ class ActivityPub::NoteSerializer < ActivityPub::Serializer
|
|||
|
||||
attribute :content
|
||||
attribute :content_map, if: :language?
|
||||
attribute :updated, if: :edited?
|
||||
|
||||
has_many :media_attachments, key: :attachment
|
||||
has_many :virtual_tags, key: :tag
|
||||
|
@ -65,6 +66,8 @@ class ActivityPub::NoteSerializer < ActivityPub::Serializer
|
|||
object.language.present?
|
||||
end
|
||||
|
||||
delegate :edited?, to: :object
|
||||
|
||||
def in_reply_to
|
||||
return unless object.reply? && !object.thread.nil?
|
||||
|
||||
|
@ -79,6 +82,10 @@ class ActivityPub::NoteSerializer < ActivityPub::Serializer
|
|||
object.created_at.iso8601
|
||||
end
|
||||
|
||||
def updated
|
||||
object.edited_at.iso8601
|
||||
end
|
||||
|
||||
def url
|
||||
ActivityPub::TagManager.instance.url_for(object)
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue