Skip to:
Content

BuddyPress.org

Opened 10 years ago

Closed 10 years ago

#5479 closed enhancement (fixed)

Messages: Better notification formatting and marking

Reported by: r-a-y's profile r-a-y Owned by: r-a-y's profile r-a-y
Milestone: 2.0 Priority: normal
Severity: normal Version:
Component: Messages Keywords: has-patch
Cc:

Description (last modified by r-a-y)

This ticket stems from ticket:5273#comment:33.

It reformats the notification for new messages and clears them when the user visits the actual message thread instead of the message inbox.

Patch also fixes a bug with a user's notification cache not being cleared when a notification is marked as either read or unread.

Attachments (1)

5479.01.patch (4.7 KB) - added by r-a-y 10 years ago.

Download all attachments as: .zip

Change History (4)

@r-a-y
10 years ago

#1 @r-a-y
10 years ago

  • Description modified (diff)

#2 @boonebgorges
10 years ago

Is there a reason you're doing this

$text = sprintf( __( '%2$s sent you a new private message', 'buddypress' ), (int) $total_items, bp_core_get_user_displayname( $secondary_item_id ) ); 

instead of this

$text = sprintf( __( '%1$s sent you a new private message', 'buddypress' ), bp_core_get_user_displayname( $secondary_item_id ) ); 

?

I assume it's just a half-finished idea :)

bp_messages_screen_inbox_mark_notifications() should be properly deprecated if you're going to use a different technique for clearing.

A unit test for the failed cache busting would be truly delightful, but is not a deal-breaker.

Otherwise the changes look good. Thanks!

#3 @r-a-y
10 years ago

  • Owner set to r-a-y
  • Resolution set to fixed
  • Status changed from new to closed

In 8202:

Messages: Reformat new message notifications.

This commit changes the single message notification link to go
directly to the message thread in question and not the message inbox.

When the message thread is viewed, new messages are marked as read.

Fixes #5479

Note: See TracTickets for help on using tickets.