-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Notification duplicate removal should favour the longer notification #1375
Comments
Would longer really be the best way to tackle this? In the image, I would rather know someone mentioned me than replied to a topic that I started. Would it not be possible to give each type of notification a sort of importance rating. So if two notifications are possible, it will just display whichever is higher on that rating. |
An importance rating may work better 👍 |
There's a bit of an async bug which explains why duplicates occur. When multiple notifications are added at the same time, both calls to check whether the notification exists returns Might remove that check and just remove duplicates during the "getNotifications" method. |
Why not have have "iamcardinal replied and mentioned you in: Random Freaking Posts" |
@crdnl One's core, another is a plugin, so it would be a little tougher to have them play nicely 😄 |
Duplicate detection is currently achieved through notifications' unique ids, if set. An idea:
Unfortunately there's no easy way to combine both notification texts into one... |
@barisusakli didn't you fix something to do with this recently? |
I changed the |
Yes, it does still happen. Right now the follower notification ("julian has posted a reply to themes") is done at the same time as the hook for topic posting, and due to a race condition, both notifications end up making it into the database as the check for notifications returns false. Easy fix would be to delay the firing of the post hook until after the follower notification has returned. I initially was hesitant to do this as it would be a delay incurred that could possibly be avoided, but it seems to be an acceptable workaround upon second glance. |
Merged the notification branch, here are some notable changes.
|
If a notification gets created and pushed to a user with the same uniqueId, it should favour the notification with the longer message text. Right now I believe it just favours the later one.
Also dbl check mentions vs. reply
![selection_013](https://cloud.githubusercontent.com/assets/923011/2680106/f081a01e-c17d-11e3-897a-e8751a35d6ae.png)
uniqueId
:The text was updated successfully, but these errors were encountered: