Fix /admin/accounts/:account_id/statuses/:id
for edited posts with media attachments (#30819)
This commit is contained in:
parent
ae7ec2bbd9
commit
f3ac508cf7
3 changed files with 16 additions and 12 deletions
19
Gemfile.lock
19
Gemfile.lock
|
@ -326,7 +326,7 @@ GEM
|
|||
httplog (1.6.3)
|
||||
rack (>= 2.0)
|
||||
rainbow (>= 2.0.0)
|
||||
i18n (1.14.5)
|
||||
i18n (1.14.1)
|
||||
concurrent-ruby (~> 1.0)
|
||||
i18n-tasks (1.0.13)
|
||||
activesupport (>= 4.0.2)
|
||||
|
@ -427,7 +427,6 @@ GEM
|
|||
mime-types-data (~> 3.2015)
|
||||
mime-types-data (3.2024.0305)
|
||||
mini_mime (1.1.5)
|
||||
mini_portile2 (2.8.7)
|
||||
minitest (5.22.3)
|
||||
msgpack (1.7.2)
|
||||
multi_json (1.15.0)
|
||||
|
@ -447,10 +446,8 @@ GEM
|
|||
timeout
|
||||
net-smtp (0.5.0)
|
||||
net-protocol
|
||||
net-ssh (7.1.0)
|
||||
nio4r (2.7.3)
|
||||
nokogiri (1.16.6)
|
||||
mini_portile2 (~> 2.8.2)
|
||||
nokogiri (1.16.6-x86_64-linux)
|
||||
racc (~> 1.4)
|
||||
nsa (0.3.0)
|
||||
activesupport (>= 4.2, < 7.2)
|
||||
|
@ -541,10 +538,11 @@ GEM
|
|||
rack (~> 2.2, >= 2.2.4)
|
||||
rack-proxy (0.7.7)
|
||||
rack
|
||||
rack-session (1.0.2)
|
||||
rack (< 3)
|
||||
rack-test (2.1.0)
|
||||
rack (>= 1.3)
|
||||
rackup (1.0.0)
|
||||
rack (< 3)
|
||||
webrick
|
||||
rails (7.1.3.2)
|
||||
actioncable (= 7.1.3.2)
|
||||
actionmailbox (= 7.1.3.2)
|
||||
|
@ -576,7 +574,8 @@ GEM
|
|||
railties (7.1.3.2)
|
||||
actionpack (= 7.1.3.2)
|
||||
activesupport (= 7.1.3.2)
|
||||
method_source
|
||||
irb
|
||||
rackup (>= 1.0.0)
|
||||
rake (>= 12.2)
|
||||
thor (~> 1.0, >= 1.2.2)
|
||||
zeitwerk (~> 2.6)
|
||||
|
@ -737,7 +736,7 @@ GEM
|
|||
terminal-table (3.0.2)
|
||||
unicode-display_width (>= 1.1.1, < 3)
|
||||
terrapin (1.0.1)
|
||||
climate_control (>= 0.0.3, < 1.0)
|
||||
climate_control
|
||||
test-prof (1.3.3)
|
||||
thor (1.3.1)
|
||||
tilt (2.3.0)
|
||||
|
@ -809,7 +808,7 @@ GEM
|
|||
zeitwerk (2.6.16)
|
||||
|
||||
PLATFORMS
|
||||
ruby
|
||||
x86_64-linux
|
||||
|
||||
DEPENDENCIES
|
||||
active_model_serializers (~> 0.10)
|
||||
|
|
|
@ -42,8 +42,8 @@ class StatusEdit < ApplicationRecord
|
|||
|
||||
scope :ordered, -> { order(id: :asc) }
|
||||
|
||||
delegate :local?, :application, :edited?, :edited_at, :language,
|
||||
:discarded?, :visibility, to: :status
|
||||
delegate :local?, :application, :edited?, :edited_at,
|
||||
:discarded?, :visibility, :language, to: :status
|
||||
|
||||
def emojis
|
||||
return @emojis if defined?(@emojis)
|
||||
|
|
|
@ -44,6 +44,11 @@ describe Admin::StatusesController do
|
|||
|
||||
describe 'GET #show' do
|
||||
before do
|
||||
status.media_attachments << Fabricate(:media_attachment, type: :image, account: status.account)
|
||||
status.save!
|
||||
status.snapshot!(at_time: status.created_at, rate_limit: false)
|
||||
status.update!(text: 'Hello, this is an edited post')
|
||||
status.snapshot!(rate_limit: false)
|
||||
get :show, params: { account_id: account.id, id: status.id }
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue