about summary refs log tree commit diff
path: root/app/lib/access_token_extension.rb
diff options
context:
space:
mode:
authorClaire <claire.github-309c@sitedethib.com>2022-04-28 19:24:18 +0200
committerGitHub <noreply@github.com>2022-04-28 19:24:18 +0200
commit78f7f23ad21359893cb022b7c2f7644d5c22cb43 (patch)
tree77b919683a8656a361d7d62c8745233bc8b2d310 /app/lib/access_token_extension.rb
parent6a9d1549484a6fb02d7d01e884577a7185302046 (diff)
parentf23f784f1811a5e7ae82faaf8868e389e9608f5d (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.rb4
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