From 12aa7c5219d08a1b92bb0da55f5412154a1ff56b Mon Sep 17 00:00:00 2001 From: Claire Date: Fri, 15 Sep 2023 10:23:24 +0200 Subject: [PATCH] Fix processing of `min_id` and `max_id` parameters in `/api/v2/search` (#26927) --- app/services/statuses_search_service.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/services/statuses_search_service.rb b/app/services/statuses_search_service.rb index e2a5f41b10..7d5b0203a0 100644 --- a/app/services/statuses_search_service.rb +++ b/app/services/statuses_search_service.rb @@ -39,12 +39,12 @@ class StatusesSearchService < BaseService end if @options[:min_id] - timestamp = Mastodon::Snowflake.to_time(@options[:min_id]) + timestamp = Mastodon::Snowflake.to_time(@options[:min_id].to_i) syntax_options << "after:\"#{timestamp.iso8601}\"" end if @options[:max_id] - timestamp = Mastodon::Snowflake.to_time(@options[:max_id]) + timestamp = Mastodon::Snowflake.to_time(@options[:max_id].to_i) syntax_options << "before:\"#{timestamp.iso8601}\"" end