FIX: Maintain notification order by priority (PR #13186)

When the client received a new notification, it prioritized only PM notifications instead of maintaining the priority order.

Later, the check for missing notification deleted all notifications that were in the wrong order because it could not match the IDs.

GitHub

For such a critical bug I think it’s definitely worth adding a test as well

So what happens when an unread PMs shows up?

PM notifications are high priority which means that it will be inserted at the top.

So why did we need the “hack” to ensure unread PMs would go to the top?

I could well just be that we added the hack on the client-side, then later we fixed server-side the mark unread PMs as high priority and forgot to remove the hack on the client-side? But I just want us to be 100% sure about that before removing that behavior on the client-side.

We used to have only a single ‘high priority’ notification and that was unread PMs. Now we have bookmark reminders too.