Nodebb: Notifications.merge results in "new posts made to topic" notifications going to end of topic

Created on 25 Mar 2016  路  6Comments  路  Source: NodeBB/NodeBB

Ideally, the first unread post should be the target of the merged notification.

Ref: apapadimoulis/what-bugs#54

bug

Most helpful comment

As it turns out, it was a one-line fix :thought_balloon:

All 6 comments

Ugh, right, that's a silly mistake on my part.

The related code is here in notifications.js. Because I remove duplicates by comparing .indexOf, it always preserves the first, which is the newest.

The code calling Notifications.merge could pass in the reversed array and reverse the output again, but that's... kind of a silly way of doing it. That's 2am thinking for you :coffee:

As it turns out, it was a one-line fix :thought_balloon:

This seems to still be slightly out of whack. I've noticed times where the noficiation for someone replying directly to me gets overridden by the notification of someone replying to that person when I am watching the thread. E.g., I post to thread, someone replies to me, then someone replies to them -> I only get notification for the last post and unless I scroll up I'll have no idea someone replied to me.

I've also seen times where it just flat out starts at a later post for no discernable reason.

@BenLubar This is currently still happening on what.thedailywtf, did we ever merge the fix or was there a regression?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

djensen47 picture djensen47  路  5Comments

FaizanZahid picture FaizanZahid  路  5Comments

BenLubar picture BenLubar  路  3Comments

aStonedPenguin picture aStonedPenguin  路  4Comments

uplift picture uplift  路  3Comments