Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
12/14/2022 09:42:06 PM (2 years ago)
Author:
imath
Message:

Improve consistency between private message status & notification

A private message can have a status set to read or unread by the user. When the Notifications component is active, a notification is generated each time a message is sent. When the user opens this message, 2 actions are performed:

  1. Set the message status as read.
  2. Mark the notification about this message as read.

When opening a message, even if the message has a read status, we still need to check if there's an existing notification about it as notifications can be marked unread from the user's notifications screen. If it's the case, then we need to make sure to mark this unread notification as read 🤪.

Props niftythree

Closes https://github.com/buddypress/buddypress/pull/43
See #8778 (trunk)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-messages/actions/view.php

    r13096 r13383  
    5454     */
    5555    if ( bp_is_my_profile() ) {
     56        // This is marking the messages as read inside the BP Messages component's recipient table.
    5657        messages_mark_thread_read( $thread_id );
    5758    }
Note: See TracChangeset for help on using the changeset viewer.