From 983c7567aaf5afc345ffffc1f53d07f57add92b3 Mon Sep 17 00:00:00 2001 From: Sam Date: Tue, 18 Feb 2014 16:09:24 +1100 Subject: [PATCH] BUGFIX: seen recently key needs to be public so mock can easily reach in to it --- app/services/group_message.rb | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/app/services/group_message.rb b/app/services/group_message.rb index 5fd8a9a2c9c..2064f87aee8 100644 --- a/app/services/group_message.rb +++ b/app/services/group_message.rb @@ -64,9 +64,7 @@ class GroupMessage $redis.setex(sent_recently_key, @opts[:limit_once_per].try(:to_i) || 86_400, 1) unless @opts[:limit_once_per] == false end - private - - def sent_recently_key - "grpmsg:#{@group_name}:#{@message_type}:#{@opts[:user] ? @opts[:user].username : ''}" - end + def sent_recently_key + "grpmsg:#{@group_name}:#{@message_type}:#{@opts[:user] ? @opts[:user].username : ''}" + end end