Add editing for published statuses (#17320)
* Add editing for published statuses * Fix change of multiple-choice boolean in poll not resetting votes * Remove the ability to update existing media attachments for now
This commit is contained in:
parent
20a3564ab2
commit
63002cde03
25 changed files with 839 additions and 77 deletions
|
@ -217,24 +217,18 @@ class ActivityPub::ProcessStatusUpdateService < BaseService
|
|||
|
||||
return if @status.edits.any?
|
||||
|
||||
@status.edits.create(
|
||||
text: @status.text,
|
||||
spoiler_text: @status.spoiler_text,
|
||||
@status.snapshot!(
|
||||
media_attachments_changed: false,
|
||||
account_id: @account.id,
|
||||
created_at: @status.created_at
|
||||
at_time: @status.created_at
|
||||
)
|
||||
end
|
||||
|
||||
def create_edit!
|
||||
return unless significant_changes?
|
||||
|
||||
@status_edit = @status.edits.create(
|
||||
text: @status.text,
|
||||
spoiler_text: @status.spoiler_text,
|
||||
@status.snapshot!(
|
||||
media_attachments_changed: @media_attachments_changed || @poll_changed,
|
||||
account_id: @account.id,
|
||||
created_at: @status.edited_at
|
||||
account_id: @account.id
|
||||
)
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue