buddypress/tests/phpunit/testcases
Mathieu Viet b41ed6c1de BP Messages: make sure Threads unread count is consistent
[13102] introduced a regression considering the way we used to set a thread's unread count. This count is set using the list of recipient objects (which include an `unread_count` property for each user object) by checking for the requested user ID into this list to find the corresponding unread count.

Slicing this list into smaller parts to paginate recipients results introduced potential cases where the requested user ID wasn't found into this paginated list of recipients.

Before doing the slice operation, we need to set the requested user ID thread's unread count to be sure it's the right one and not a `null` value.

Props sjregan

Fixes #8750 (branch 10.0)



git-svn-id: https://buddypress.svn.wordpress.org/branches/10.0@13340 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
2022-10-11 19:22:19 +00:00
..
activity Group the BP_Activity_Activity::get_id() method params into an array 2021-11-14 15:51:15 +00:00
admin Retire Legacy Forums. 2017-12-08 00:22:09 +00:00
blogs Support date queries for Members, Groups and Sites 2021-12-12 14:09:02 +00:00
core Attachments: introduce a new function to retrieve a media mime type 2022-03-15 23:30:04 +00:00
friends Marking deprecated query classes, their methods, arguments as deprecated in the BP_Friends_Friendship and BP_Friends_Friendship classes. 2021-08-22 03:16:06 +00:00
groups Improve group members count query performance 2022-05-18 05:46:32 +00:00
members Make sure member has a type before trying to remove one 2022-02-20 18:10:18 +00:00
messages BP Messages: make sure Threads unread count is consistent 2022-10-11 19:22:19 +00:00
notifications Clear the user notification cache when bulk marking as unread items 2022-02-25 13:45:23 +00:00
routing Adapt BuddyPress to WP 5.1.0 multisite changes & deprecations 2020-03-31 02:45:13 +00:00
settings Improve sanitization of email notification settings. 2015-11-11 03:22:53 +00:00
testsuite Use static factory method throughout PHPUnit tests. 2017-11-03 19:44:10 +00:00
xprofile xProfile: prevent the Name field to override WP Field Types on signup 2021-10-09 17:13:00 +00:00