about summary refs log tree commit diff
path: root/app/services/follow_service.rb
diff options
context:
space:
mode:
authorysksn <bluewhale1982@gmail.com>2019-02-03 03:11:38 +0900
committerEugen Rochko <eugen@zeonfederated.com>2019-02-02 19:11:38 +0100
commitbcfff65195f557dc086470f91b4c90b15c004cf7 (patch)
treecdf805998758278b41cd8ab0cc8dd864d8047c57 /app/services/follow_service.rb
parent6a5e3da6b044e50635d293c2716883cc5627e4c8 (diff)
Create Redisable#redis (#9633)
* Create Redisable

* Use #redis instead of Redis.current
Diffstat (limited to 'app/services/follow_service.rb')
-rw-r--r--app/services/follow_service.rb6
1 files changed, 2 insertions, 4 deletions
diff --git a/app/services/follow_service.rb b/app/services/follow_service.rb
index 9d36a1449..92d8c864a 100644
--- a/app/services/follow_service.rb
+++ b/app/services/follow_service.rb
@@ -1,6 +1,8 @@
 # frozen_string_literal: true
 
 class FollowService < BaseService
+  include Redisable
+
   # Follow a remote user, notify remote user about the follow
   # @param [Account] source_account From which to follow
   # @param [String, Account] uri User URI to follow in the form of username@domain (or account record)
@@ -67,10 +69,6 @@ class FollowService < BaseService
     follow
   end
 
-  def redis
-    Redis.current
-  end
-
   def build_follow_request_xml(follow_request)
     OStatus::AtomSerializer.render(OStatus::AtomSerializer.new.follow_request_salmon(follow_request))
   end