Skip to content

Issue/2268 getting a notification for your own message

This MR fix #2268.

I could reproduce the issue in local. The problem come from the function countUnreadPMsByUser with the SQL where clause (l.112) 'u.ref1 < g.ref1 OR u.ref1 IS NULL' : When a new PM is created, the user_group_association created has a null ref1 (and that trigger the notification).

This MR set the ref1 for the creator of the PM in the user_group_association in order to avoid this notification (ref1 is set to user_group ref1, as it's what is done when reading the message (ping_fetch_new_messages))

Edited by Nicolas Mauti

Merge request reports