New post notification for my own post


#1

When I post in a topic and then open another tab before the post has been processed (which takes a few seconds) the title bar of the tab shows a new post has arrived.

Upon going back to the Discourse tab I only get disappointed seeing no new post was actually made.


(Robin Ward) #2

I see this a lot @sam – I’m not sure if we’ve discussed before but is there any way the message bus could not notify me of my own new posts?


(Jeff Atwood) #3

I doubt @sam can repro this from Australia as I suspect it is timing related.


#4

I think it’s easiest to reproduce on a slow, mobile, uplink. The way I see it it goes something like this:

  1. Press the ‘Reply’ button, send the reply to the server
  2. The server processes the reply
  3. The message bus sends the new message to everyone viewing the topic

At step three, the client-side JavaScript checks whether you have that topic open and whether the tab/window that has it is active. If not active, it will update the title.

The more time between 1 and 3 exists (due to a high ping), the more chance of triggering the bug.


(Sam Saffron) #5

I just fixed this :slight_smile:

https://github.com/discourse/discourse/commit/e17978a203a38f8036356dcf038ceda22c27ada5


(Sam Saffron) #6