Fix processing of `min_id` and `max_id` parameters in `/api/v2/search` (#26927)

local
Claire 8 months ago committed by GitHub
parent 82015dbab6
commit 9693c271f1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      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

Loading…
Cancel
Save