Don't check for user sign in when fetching subscriptions in timeline

This commit is contained in:
Karina Kwiatek 2023-02-19 15:50:32 +01:00
parent 904eab8daa
commit d77919ee01
1 changed files with 1 additions and 1 deletions

View File

@ -35,7 +35,7 @@ class TimelineController < ApplicationController
timeline_ids = @timeline.map(&:id)
@timeline_last_id = timeline_ids.min
@more_data_available = !yield(last_id: @timeline_last_id, size: 1).count.zero?
subscribed_answer_ids = Subscription.where(user: current_user, answer_id: timeline_ids).pluck(:answer_id) if user_signed_in?
subscribed_answer_ids = Subscription.where(user: current_user, answer_id: timeline_ids).pluck(:answer_id)
respond_to do |format|
format.html { render "timeline/timeline", locals: { subscribed_answer_ids: } }