This repository has been archived on 2023-03-18. You can view files and clone it, but cannot push or open issues or pull requests.
osr-discourse-src/app/assets/javascripts/discourse/tests/unit/models
Krzysztof Kotlarek da2a61e36c
FIX: correct tracking when mute all categories (#11441)
Currently, we have a solution for muted topics. Basically, when a post is created first we send a `muted` message to users who muted that specific topic:

https://github.com/discourse/discourse/blob/master/app/models/topic_tracking_state.rb#L91

Later, topic tracking state filters if the topic is muted or not before update state:

https://github.com/discourse/discourse/blob/master/app/assets/javascripts/discourse/app/models/topic-tracking-state.js#L58:L67

That solution works quite well.

I wanted to extend it to handle `mute all categories by default` setting as well.

In that case, we should only inform the user about new topic/post when they explicitly want to.

If that setting is enabled, we would send "unmuted" message to a user who watches specific category, topic or tag. In all other cases, don't inform user about new topic as all categories are muted by default.

Meta: https://meta.discourse.org/t/threads-muted-by-mute-all-by-default-are-showing-up-as-new-but-not-visible/168324
2020-12-10 16:49:05 +11:00
..
badge-test.js DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
category-test.js DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
composer-test.js DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
email-log-test.js DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
group-test.js DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
invite-test.js DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
nav-item-test.js DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
post-stream-test.js DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
post-test.js DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
report-test.js DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
rest-model-test.js DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
result-set-test.js DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
session-test.js DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
site-test.js DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
staff-action-log-test.js DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
topic-details-test.js DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
topic-test.js DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
topic-tracking-state-test.js FIX: correct tracking when mute all categories (#11441) 2020-12-10 16:49:05 +11:00
user-action-test.js DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
user-badge-test.js DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
user-drafts-test.js DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
user-stream-test.js DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00
user-test.js DEV: Sort imports alphabetically (#11382) 2020-12-01 15:31:26 -03:00