# Duplicate request when changing notification level

**URL:** <https://meta.discourse.org/t/duplicate-request-when-changing-notification-level/61543>\
**Category:** Bug\
**Created:** [April 25, 2017, 5:13am UTC](https://meta.discourse.org/t/duplicate-request-when-changing-notification-level/61543 "2017-04-25T05:13:44Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![blake](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/blake/32/157322_2.png) [@blake](https://meta.discourse.org/u/blake)\
**Post date:** [April 25, 2017, 5:13am UTC](https://meta.discourse.org/t/duplicate-request-when-changing-notification-level/61543/1 "2017-04-25T05:13:44Z")

</div>

When you want to change your notification level for a topic, ember is sending duplicate api requests.

 ![](https://global.discourse-cdn.com/meta/original/3X/a/3/a31be9d7ea6422df6e0916b90fe63f67e615a860.png)

---

<div class="post-metadata">

**Author:** ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)\
**Post date:** [April 25, 2017, 10:41pm UTC](https://meta.discourse.org/t/duplicate-request-when-changing-notification-level/61543/3 "2017-04-25T22:41:24Z")

</div>

I bet this is happening cause the message bus is sending it a message telling it that the notification level changed and that triggers a second refresh, worth fixing for sure.

---

<div class="post-metadata">

**Author:** ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)\
**Post date:** [May 16, 2017, 8:53pm UTC](https://meta.discourse.org/t/duplicate-request-when-changing-notification-level/61543/4 "2017-05-16T20:53:57Z")

</div>

fixed per:

[https://github.com/discourse/discourse/commit/68df8f4427fdd4813e43395a7007928f686923b1](https://github.com/discourse/discourse/commit/68df8f4427fdd4813e43395a7007928f686923b1)

A lot of history behind this code, it still feels a bit messy, last time around @tgxworld needed to fix it so keyboard shortcuts update the box, a side effect was the double ajax calls

---

<div class="post-metadata">

**Author:** ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)\
**Post date:** [May 16, 2017, 8:54pm UTC](https://meta.discourse.org/t/duplicate-request-when-changing-notification-level/61543/5 "2017-05-16T20:54:01Z")

</div>



---

<div class="post-metadata">

**Author:** ![tgxworld](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tgxworld/32/106117_2.png) [@tgxworld](https://meta.discourse.org/u/tgxworld)\
**Post date:** [May 17, 2017, 2:30am UTC](https://meta.discourse.org/t/duplicate-request-when-changing-notification-level/61543/6 "2017-05-17T02:30:57Z")

</div>

Thanks for fixing. I was actually fixing the case where changing the notification level using the component in the topic menu item wasn’t updating the notification level in the widget mounted within the timeline. Anyway I had a look into the code path again and realized that I should have just re-rendered the topic timeline again.

[https://github.com/discourse/discourse/commit/92118dd1d1f3db4abc5405f04707b5f3e0deec88](https://github.com/discourse/discourse/commit/92118dd1d1f3db4abc5405f04707b5f3e0deec88)
