diff options
Diffstat (limited to 'app/lib')
-rw-r--r-- | app/lib/activitypub/activity.rb | 2 | ||||
-rw-r--r-- | app/lib/activitypub/activity/move.rb | 2 | ||||
-rw-r--r-- | app/lib/feed_manager.rb | 2 | ||||
-rw-r--r-- | app/lib/response_with_limit.rb | 10 |
4 files changed, 13 insertions, 3 deletions
diff --git a/app/lib/activitypub/activity.rb b/app/lib/activitypub/activity.rb index ee35e1e8d..58cec7ac4 100644 --- a/app/lib/activitypub/activity.rb +++ b/app/lib/activitypub/activity.rb @@ -132,7 +132,7 @@ class ActivityPub::Activity end def delete_arrived_first?(uri) - redis.exists("delete_upon_arrival:#{@account.id}:#{uri}") + redis.exists?("delete_upon_arrival:#{@account.id}:#{uri}") end def delete_later!(uri) diff --git a/app/lib/activitypub/activity/move.rb b/app/lib/activitypub/activity/move.rb index 12bb82d25..2103f503f 100644 --- a/app/lib/activitypub/activity/move.rb +++ b/app/lib/activitypub/activity/move.rb @@ -33,7 +33,7 @@ class ActivityPub::Activity::Move < ActivityPub::Activity end def processed? - redis.exists("move_in_progress:#{@account.id}") + redis.exists?("move_in_progress:#{@account.id}") end def mark_as_processing! diff --git a/app/lib/feed_manager.rb b/app/lib/feed_manager.rb index af0fa2b98..6afdd3b08 100644 --- a/app/lib/feed_manager.rb +++ b/app/lib/feed_manager.rb @@ -205,7 +205,7 @@ class FeedManager private def push_update_required?(timeline_id) - redis.exists("subscribed:#{timeline_id}") + redis.exists?("subscribed:#{timeline_id}") end def blocks_or_mutes?(receiver_id, account_ids, context) diff --git a/app/lib/response_with_limit.rb b/app/lib/response_with_limit.rb new file mode 100644 index 000000000..2cc17bc5f --- /dev/null +++ b/app/lib/response_with_limit.rb @@ -0,0 +1,10 @@ +# frozen_string_literal: true + +class ResponseWithLimit + def initialize(response, limit) + @response = response + @limit = limit + end + + attr_reader :response, :limit +end |