Merge commit from fork
* Streaming: Ensure disabled users cannot connect to streaming * Streaming: Disconnect when the user is disabled
This commit is contained in:
@@ -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!
|
||||
|
||||
Reference in New Issue
Block a user