2
0

Merge commit from fork

* Streaming: Ensure disabled users cannot connect to streaming

* Streaming: Disconnect when the user is disabled

---------

Co-authored-by: Emelia Smith <ThisIsMissEm@users.noreply.github.com>
This commit is contained in:
Claire
2025-10-13 14:19:14 +02:00
committed by GitHub
parent 6796765363
commit 8477bec2f2
4 changed files with 36 additions and 5 deletions

View File

@@ -476,12 +476,15 @@ RSpec.describe User do
let(:current_sign_in_at) { Time.zone.now }
before do
user.disable!
end
it 'disables user' do
allow(redis).to receive(:publish)
user.disable!
expect(user).to have_attributes(disabled: true)
expect(redis)
.to have_received(:publish).with("timeline:system:#{user.account.id}", Oj.dump(event: :kill)).once
end
end