mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: Dismissing unread posts did not publish changes to other clients (#22584)
Why this change? Prior to this change, dismissing unreads posts did not publish the changes across clients for the same user. As a result, users can end up seeing an unread count being present but saw no topics being loaded when visiting the `/unread` route.
This commit is contained in:
committed by
GitHub
parent
ab6c638da2
commit
48c8ed49d6
@@ -1100,11 +1100,12 @@ class TopicsController < ApplicationController
|
||||
|
||||
dismissed_topic_ids = []
|
||||
dismissed_post_topic_ids = []
|
||||
|
||||
if !current_user.new_new_view_enabled? || params[:dismiss_topics]
|
||||
dismissed_topic_ids =
|
||||
TopicsBulkAction.new(current_user, topic_scope.pluck(:id), type: "dismiss_topics").perform!
|
||||
TopicTrackingState.publish_dismiss_new(current_user.id, topic_ids: dismissed_topic_ids)
|
||||
end
|
||||
|
||||
if params[:dismiss_posts]
|
||||
if params[:untrack]
|
||||
dismissed_post_topic_ids =
|
||||
|
||||
Reference in New Issue
Block a user