[buddypress-trac] [BuddyPress Trac] #8750: Unread count not set for message threads
buddypress-trac
noreply at wordpress.org
Tue Oct 11 19:22:25 UTC 2022
#8750: Unread count not set for message threads
--------------------------------------+---------------------
Reporter: sjregan | Owner: imath
Type: defect (bug) | Status: closed
Priority: normal | Milestone: 10.5.0
Component: Messages | Version: 10.4.0
Severity: normal | Resolution: fixed
Keywords: has-patch has-unit-tests |
--------------------------------------+---------------------
Changes (by imath):
* owner: (none) => imath
* status: new => closed
* resolution: => fixed
Comment:
In [changeset:"13340" 13340]:
{{{
#!CommitTicketReference repository="" revision="13340"
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)
}}}
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/8750#comment:10>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac
More information about the buddypress-trac
mailing list