# "X new / updated topics" gets triggered for muted topics

**URL:** <https://meta.discourse.org/t/x-new-updated-topics-gets-triggered-for-muted-topics/36226>\
**Category:** Bug\
**Tags:** planned\
**Created:** [02.Декабрь.2015 02:51:19 UTC](https://meta.discourse.org/t/x-new-updated-topics-gets-triggered-for-muted-topics/36226 "2015-12-02T02:51:19Z")\
**Posts on this page:** 1\
**Showing post:** 11

<div class="post-metadata">

**Author:** ![vinothkannans](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/vinothkannans/32/86465_2.png) [@vinothkannans](https://meta.discourse.org/u/vinothkannans)\
**Post date:** [23.Май.2017 15:45:59 UTC](https://meta.discourse.org/t/x-new-updated-topics-gets-triggered-for-muted-topics/36226/11 "2017-05-23T15:45:59Z")

</div>

> <https://github.com/discourse/discourse/blob/main/app/models/topic_tracking_state.rb#L93-L94>

Here we already having user-wise filtered MessageBus. Can we do something like above here?

Currently all users are subscribed to `/latest` MessageBus. Additionally all logged in users should be subscribed to `/latest/muted/:USERID` MessageBus. Then in server we should publish `latest` action on both MessageBuses like below

```ruby
TopicUser.each do # Should select only muted topic users
  MessageBus.publish("/latest/muted/#{tu.user_id}", message.as_json, group_ids: group_ids)
end
MessageBus.publish("/latest", message.as_json, group_ids: group_ids)

```

In client side if a topic is received on both MessageBuses then we shouldn’t display it on updated topics.

Ignore me if I am wrong. I don’t have deep knowledge on how MessageBuses working.

---

_[View the full topic](https://meta.discourse.org/t/x-new-updated-topics-gets-triggered-for-muted-topics/36226)._
