Partial fix Limit push notifications?

RobParker

Well-known member
I'm not sure if this is even possible but at the minute, if I go away and leave my browser open, I often come back to a screen full of push notifications all about one thread with different people replying. This often fills the screen and when I dismiss them more pop up. It's not uncommon to need to dismiss 20+ notifications.

Is there any way to handle this like XF does internally? i.e. not to send a second notification if you haven't visited the thread since the first one?
 

Mike

XenForo developer
Staff member
Thread watching should already be like this. The push system builds on the alerts and we only send you one watch notifications until you go read the thread again.

Are you sure they were all watch notifications for the same thread?
 

Mike

XenForo developer
Staff member
I'll move this to bugs then (specifically for thread watch notifications -- other notifications do get pushed for each action).

Though just to confirm, you weren't reading the thread on another device were you? If so, additional notifications would certainly be expected.

Did you have a bunch of alerts that matched the push notifications?
 

RobParker

Well-known member
I had alert on here when I visited after I dismissed the 20+ notifications.

I'll screenshot it when it happens again.
 

Mike

XenForo developer
Staff member
Are you getting many alerts as well? (Note that they may be marked as read, but they'll still be listed.)
 

Alfa1

Well-known member
IIRC, I did. I noticed this for the Language Nodes suggestion thread which has attracted a mass of likes in the past few days. I repeatedly got over a dozen Push notifications and Alert bubbles at the same time.
 

Mike

XenForo developer
Staff member
Wait, so not thread watch notifications, as in from people replying? If so, that isn't the specific behavior we're talking about here. Thread reply notifications should only send one until you view the thread.

As mentioned, other actions will generally be pushed per action. (For the most part, push notifications tie directly to alerts.)

(I believe there are general alert grouping/folding suggestions that would likely apply to push notifications as well.)
 

Alfa1

Well-known member
You are correct. Its a different issue. Its a combination of thread replies and post ratings that can cause a mass of Push alerts about the same content. Alert grouping would be a major improvement for this.
 

Chris D

XenForo developer
Staff member
So, there are still quite a few question marks over how the originally reported issue could happen. Push notifications only get sent if there is an alert to be sent. In the case of users replying to a watched thread, there is only an alert to be sent if you have read the thread since the last one.

Therefore we don't believe there to be an issue with that specifically.

However, when you're receiving notifications on multiple devices, there's a theoretical problem which involves a lot of duplication.

So here's a scenario involving two devices. A laptop and a phone. If I'm on my laptop for several hours and during that time I get a reply alert, view the thread and reply, I get another reply alert, view and reply (etc.) and that happened 5 times, it is correct that you would receive 5 alerts/push notifications. When I pick up my phone later, it will have 5 push notifications on it.

Although we're not ready to implement any sort of alert grouping/summarization/folding yet, there is some functionality within the Push API itself that can help.
You'll see the first notification come through, but then the wording changes to append (+ 1 previous) to it. This indicates that another notification has come in and we have replaced that previous one with the new one and we maintain a count of those duplicate alerts. So by the end of it instead of having 7 push notifications to go through for the same content, we only have 3. (We decided that grouping them by reaction type was worthwhile).

So, at best, this should alleviate whatever the original issue was. I suspect somewhere down the line something is happening and the behaviour is expected. For now, if you have any further information, please let us know.
 

Chris D

XenForo developer
Staff member
Not sure if it's related (or the thread/post was removed) but I got a browser notification (FF/W10) about a reply from Neutral Singh and when I clicked it said Oopps post cannot be found - https://xenforo.com/community/posts/1297651/
The user removed their post between the notification being sent to you and you clicking on it.

Of course with standard forum alerts we can do checks to make sure the content still exists/is visible but with push notifications (and emails incidentally, if you have watch thread emails switched on) once they're sent, they're sent.
 

RobParker

Well-known member
I'm still not sure if I'm misunderstanding how it should work or if it's a bug.

  • I have notifications enabled on Chrome on my work laptop.
  • This was shut down and off all weekend.
  • Over the weekend I browsed XF on my home laptop, iphone, etc.
  • Turning on my work laptop on Monday morning (now) and opening Chrome, I get a load of notifications from XF.
  • Screenshot shows two for the same thing but I received something like 10 notifications for different threads, types, etc.
  • I load xf.com and I have no alerts (as expected as I saw them all over the weekend)
  • Is this expected?
188329
 

Chris D

XenForo developer
Staff member
It is expected potentially due to browser caching of the service worker and it still being loaded into your browser.

We don’t envisage we’ll need to change the service worker very often, but when we do it may take a while for the changes to take effect.

Logging out and back in on the laptop may help it on its way and once you’ve done that I’ll try and trigger the correct behaviour for you.

But even then it still might not work depending on whether the service worker gets the changes or not.
 

RobParker

Well-known member
It is expected potentially due to browser caching of the service worker and it still being loaded into your browser.

We don’t envisage we’ll need to change the service worker very often, but when we do it may take a while for the changes to take effect.

Logging out and back in on the laptop may help it on its way and once you’ve done that I’ll try and trigger the correct behaviour for you.

But even then it still might not work depending on whether the service worker gets the changes or not.
The laptop was off all weekend and I just logged on. Do you mean logging out and back in again in addition to that?
 
Top