-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Duplicate desktop notifications for same chat. #474
Comments
+1, this is back today for me. |
@marcaaron or @Jag96, can you look into this? It looks like dupe issues was fixed in the below that it looks like you two worked on. #333 and #357 |
@ryanldonato, when Chirag's update goes through it'll fix your issue because you're on web and the notifications that are coming from expensify.com will stop and you'll only get them via chat.expensify.com |
Can you add a screenshot of the JS console (in verbose logging mode) and filter it for |
I looked into this a little more this morning with the help of Ted, and here is what I've been able to determine so far.
This is my theory anyway. I've been attempting to reproduce it locally without any luck. cc @marc |
I could be wrong about that because this SO suggests that multiple calls to So I don't know how we are subscribing to the same event multiple times, but I saw that it only happened after pusher had reconnected... |
Here's where we do the work of subscribing and will only subscribe if we are not already subscribed so my first guess would be that Pusher has unsubscribed from the channel - but maybe has not cleared out it's callback map so new callbacks can be added...? It gets called from here: So maybe the |
Either way, one idea is to treat these events like any other event we only want to attach one single callback to and make use of |
Hmm so that didn't work. I think this is a possible bug with the Pusher library itself. Calling And each time a new callback was added. Not really at all what I would suspect so will keep digging here and possibly open an issue with Pusher about it. |
Ok got it. Not a Pusher bug. Expensify 🐛 |
Tested the theory above again but this time subscribed with a new event directly to a channel and did not observe the same behavior. Then figured it must be something we are doing and it was. We were binding the |
Aha! Great sleuthing, Marc! |
@garrettmknight has only Chat open on Desktop and is getting multiple notifications.
It could be related to this (https://github.com/Expensify/Expensify/issues/137041), but my hunch is no.
Also.. I'm not sure if it's directly related to this (#331), because this issue appears to be more about web and e.com vs chat.e.com.
cc @marcaaron and @chiragsalian since I think you've both worked on this
The text was updated successfully, but these errors were encountered: