diff options
author | Claire <claire.github-309c@sitedethib.com> | 2022-04-28 19:24:18 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-28 19:24:18 +0200 |
commit | 78f7f23ad21359893cb022b7c2f7644d5c22cb43 (patch) | |
tree | 77b919683a8656a361d7d62c8745233bc8b2d310 /app/lib/access_token_extension.rb | |
parent | 6a9d1549484a6fb02d7d01e884577a7185302046 (diff) | |
parent | f23f784f1811a5e7ae82faaf8868e389e9608f5d (diff) |
Merge pull request #1756 from ClearlyClaire/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'app/lib/access_token_extension.rb')
-rw-r--r-- | app/lib/access_token_extension.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/app/lib/access_token_extension.rb b/app/lib/access_token_extension.rb index 2cafaaa20..f51bde492 100644 --- a/app/lib/access_token_extension.rb +++ b/app/lib/access_token_extension.rb @@ -4,6 +4,8 @@ module AccessTokenExtension extend ActiveSupport::Concern included do + include Redisable + after_commit :push_to_streaming_api end @@ -16,6 +18,6 @@ module AccessTokenExtension end def push_to_streaming_api - Redis.current.publish("timeline:access_token:#{id}", Oj.dump(event: :kill)) if revoked? || destroyed? + redis.publish("timeline:access_token:#{id}", Oj.dump(event: :kill)) if revoked? || destroyed? end end |