Skip to content

Commit

Permalink
Fix non-numbers being passed to Redis and causing an error (mastodon#…
Browse files Browse the repository at this point in the history
  • Loading branch information
Gargron authored and hiyuki2578 committed Oct 2, 2019
1 parent d008e4f commit 8bb41a2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app/models/feed.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ def initialize(type, id)
end

def get(limit, max_id = nil, since_id = nil, min_id = nil)
limit = limit.to_i
max_id = max_id.to_i if max_id.present?
since_id = since_id.to_i if since_id.present?
min_id = min_id.to_i if min_id.present?

from_redis(limit, max_id, since_id, min_id)
end

Expand Down

0 comments on commit 8bb41a2

Please sign in to comment.