2
0

Merge commit from fork

* Streaming: Ensure disabled users cannot connect to streaming

* Streaming: Disconnect when the user is disabled
This commit is contained in:
Emelia Smith
2025-10-13 14:19:14 +02:00
committed by GitHub
parent 692cfe27fa
commit 8d09e4ef23
4 changed files with 36 additions and 5 deletions

View File

@@ -180,6 +180,10 @@ class User < ApplicationRecord
def disable!
update!(disabled: true)
# This terminates all connections for the given account with the streaming
# server:
redis.publish("timeline:system:#{account.id}", Oj.dump(event: :kill))
end
def enable!