-
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
Private message notifications don't appear in the UI after 1 or 2 messages #2321
Comments
I can confirm this has been happening to me for about, oh, 2-3 months now. |
i can confirm that...really annoying... |
Thanks for reporting this. I edited the title - it sounds like you're getting email notifications, but no notifications in the UI? |
Yes. I think I only get notified (on d*) of the first entry on the thread. It's hard to confirm since I don't do much private messaging. I will send you a test message. We can respond to each other 2 or 3 times to see if we get notifications. |
Thanks for looking into this, Sarah, and for responding to us. Feel free to test this bug out using my diasporg account as well. |
Yeah only the first post brings up a notification for me :P Replies don't show up |
can confirm |
Please assign to 0.0.2 milestone if possible - I think this fix is pretty urgent and am willing to work on fixing in within a few days |
okay cool, remember @prellele's PR for some specs for this ;) |
Some more information for this issue: Notifications are completly working for the author of the conversation. |
OK so I bounced some messages back and forth between me and a test user on my own pod. Conversation was started by test user and as expected I stopped receiving the new message notification in the UI after the first message, but the test user always got it. From the production.log output it's pretty clear that every time test user sends me a message, the output is pretty much identical, except this is missing:
(this above is when I reply to test user) Also of course is missing the local receive part which happens when test user receives my message:
So no local dispatch is done is the problem? If so, the problem is probably in this call:
So after trying out various things I went the traditional way of adding a log printout to every decision point that the code can get to (best way to debug! :)). What I noticed was that the path separated totally at this point: https://github.com/diaspora/diaspora/blob/develop/lib/postzord/dispatcher.rb#L75 So, due to I don't have the knowledge to really say what is the difference with these, anyone? If I force it to always take the route that generates a notification to the conversation starter, when posting as conversation starter it gets notified itself of the reply. If I post as conversation recipient, a nice little loop is triggered and I have to kill the server :) Anyone who actually knows Ruby want to figure out what is actually wrong and the best way to fix it? :D |
Also, the reason I guess the first notification is delivered to the recipient is that the first message is a Conversation object and thus falls down to
I don't really understand the whole logic of the dispatcher, what is supposed to do what. If this is hard to fix in a clean way, maybe better remove the 0.0.2 milestone and rewrite it in a sane way (unless of course the code makes perfect sense but I don't just get it :)). Though a quick fix just to get these notifications would be awesome if someone can figure out what quick fix needs to be added. |
Also, it seems this issue as entirely only when recipient of message is on the same pod - at least some testing between pods generates notifications on both ends. Will continue debugging everything past (for once federation works better than local traffic haha) |
I tried to fix this in the dispatcher by making sure that a correct event is dispatched, but it really didn't come out very clean. Unwanted side effects and I'm thinking lots of rewriting of the dispatcher logic to make it simpler would need to be done there, afaik. So I went the easy way. As whatever happens notification.notify will be called, I put an Anyway, if someone wants to comment, here are the small changes: jaywink@c700b86 |
Fix in pull #3727 |
…cations Fix notifications for private messages between local users, fixes #2321
I don't notice some replies until I see them in my email.
I am referring to PM's private messages.
The text was updated successfully, but these errors were encountered: