FIX: Display summaries for anonymous users. (#23294)

Streaming doesn't work for anonymous users because we scope updates to the current user. Since they can only see cached summaries, we can skip the streaming parameter and update it directly with the ajax response.
This commit is contained in:
Roman Rizzi
2023-08-28 17:29:48 -03:00
committed by GitHub
parent d8b62c2275
commit e20de81de3
3 changed files with 62 additions and 5 deletions

View File

@@ -1185,7 +1185,7 @@ class TopicsController < ApplicationController
opts = params.permit(:skip_age_check)
if params[:stream]
if params[:stream] && current_user
Jobs.enqueue(
:stream_topic_summary,
topic_id: topic.id,