[buddypress-trac] [BuddyPress Trac] #7096: Messages: member page messages are queried for the loggedin user
buddypress-trac
noreply at wordpress.org
Thu Jul 13 15:39:21 UTC 2017
#7096: Messages: member page messages are queried for the loggedin user
--------------------------+----------------------
Reporter: Offereins | Owner: dcavins
Type: defect (bug) | Status: closed
Priority: normal | Milestone: 2.9
Component: Messages | Version:
Severity: normal | Resolution: fixed
Keywords: has-patch |
--------------------------+----------------------
Comment (by boonebgorges):
[11578] broke message notifications. The link generated in
`messages_format_notifications()` should always be relative to the logged-
in user. Now it's relative to the displayed user, and when there's no
displayed user, it simply ends up returning a malformed link, such as
`href="messages/view/55"` in the case of a single message.
Simply adding a `$user_id` parameter (which would fall back on
`bp_displayed_user_id()`) would allow for an easy fix in BP. That being
said, the change in [11578] could potentially affect third-party
implementations that are using `bp_get_message_thread_view_link()` in non-
standard ways. So, the conservative strategy would be to (a) add the
`$user_id` param, but have it default to `bp_loggedin_user_id()`; then, we
pass the displayed user ID in the context of the loop.
I'll attach a patch for review by people who've thought about this more :)
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/7096#comment:27>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac
More information about the buddypress-trac
mailing list