mirror of
https://github.com/yingziwu/mastodon.git
synced 2026-02-24 19:22:41 +00:00
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:
parent
5226b757fe
commit
4bd193cdfe
3 changed files with 12 additions and 5 deletions
|
|
@ -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!
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue