Commit eb89d552 authored by mgabdev's avatar mgabdev

Fixed issue with Tags timeline

• Fixed:
- issue with Tags timeline and incorrect number of arguments due to removal of "local" attribute
parent 6f5bd998
...@@ -46,7 +46,7 @@ class Api::V1::Timelines::TagController < Api::BaseController ...@@ -46,7 +46,7 @@ class Api::V1::Timelines::TagController < Api::BaseController
end end
def tag_timeline_statuses 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 end
def insert_pagination_headers def insert_pagination_headers
......
...@@ -27,7 +27,7 @@ class TagsController < ApplicationController ...@@ -27,7 +27,7 @@ class TagsController < ApplicationController
end end
format.json do 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) @statuses = cache_collection(@statuses, Status)
render json: collection_presenter, render json: collection_presenter,
......
...@@ -3,13 +3,13 @@ ...@@ -3,13 +3,13 @@
class HashtagQueryService < BaseService class HashtagQueryService < BaseService
LIMIT_PER_MODE = 1 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) tags = tags_for(Array(tag.name) | Array(params[:any])).pluck(:id)
all = tags_for(params[:all]) all = tags_for(params[:all])
none = tags_for(params[:none]) none = tags_for(params[:none])
Status.distinct Status.distinct
.as_tag_timeline(tags, account, local) .as_tag_timeline(tags, account)
.tagged_with_all(all) .tagged_with_all(all)
.tagged_with_none(none) .tagged_with_none(none)
end end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment