From eb89d552ce4e671d54c46c9cd3dd50d6e5359217 Mon Sep 17 00:00:00 2001 From: mgabdev <> Date: Thu, 11 Jun 2020 15:33:56 -0400 Subject: [PATCH] Fixed issue with Tags timeline MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit • Fixed: - issue with Tags timeline and incorrect number of arguments due to removal of "local" attribute --- app/controllers/api/v1/timelines/tag_controller.rb | 2 +- app/controllers/tags_controller.rb | 2 +- app/services/hashtag_query_service.rb | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/controllers/api/v1/timelines/tag_controller.rb b/app/controllers/api/v1/timelines/tag_controller.rb index b10b3de5..31cd5e96 100644 --- a/app/controllers/api/v1/timelines/tag_controller.rb +++ b/app/controllers/api/v1/timelines/tag_controller.rb @@ -46,7 +46,7 @@ class Api::V1::Timelines::TagController < Api::BaseController end def tag_timeline_statuses - HashtagQueryService.new.call(@tag, params.slice(:any, :all, :none), current_account, truthy_param?(:local)) + HashtagQueryService.new.call(@tag, params.slice(:any, :all, :none), current_account) end def insert_pagination_headers diff --git a/app/controllers/tags_controller.rb b/app/controllers/tags_controller.rb index 66b18490..02df87c6 100644 --- a/app/controllers/tags_controller.rb +++ b/app/controllers/tags_controller.rb @@ -27,7 +27,7 @@ class TagsController < ApplicationController end format.json do - @statuses = HashtagQueryService.new.call(@tag, params.slice(:any, :all, :none), current_account, params[:local]).paginate_by_max_id(PAGE_SIZE, params[:max_id]) + @statuses = HashtagQueryService.new.call(@tag, params.slice(:any, :all, :none), current_account).paginate_by_max_id(PAGE_SIZE, params[:max_id]) @statuses = cache_collection(@statuses, Status) render json: collection_presenter, diff --git a/app/services/hashtag_query_service.rb b/app/services/hashtag_query_service.rb index d9ffbc74..9dca9917 100644 --- a/app/services/hashtag_query_service.rb +++ b/app/services/hashtag_query_service.rb @@ -3,13 +3,13 @@ class HashtagQueryService < BaseService LIMIT_PER_MODE = 1 - def call(tag, params, account = nil, local = true) + def call(tag, params, account = nil) tags = tags_for(Array(tag.name) | Array(params[:any])).pluck(:id) all = tags_for(params[:all]) none = tags_for(params[:none]) Status.distinct - .as_tag_timeline(tags, account, local) + .as_tag_timeline(tags, account) .tagged_with_all(all) .tagged_with_none(none) end