#9170 closed enhancement (fixed)
BP REST API Messages Endpoint - "raw" property missing from subject/excerpt/message nodes
Reported by: | niftythree | Owned by: | espellcaste |
---|---|---|---|
Milestone: | 14.0.0 | Priority: | normal |
Severity: | normal | Version: | |
Component: | REST API | Keywords: | has-patch |
Cc: |
Description
Hi there,
We've noticed a problem with the "/messages" endpoint where the "raw" version of the subject/excerpt/message is missing from the data returned (only the "rendered" version is returned). See first image.
Comparatively, the "messages" node which provides each of the messages in the thread does contain the raw data. See second image.
Our app only processes the raw portion and presents it to the user, unfortunately we cannot use the rendered version as we would like to display the data (including any emojis) as natively to the device as possible.
We believe the raw data should also be included in the messages endpoint?
We've tested all of the above with the following set-up:
- WordPress version: 6.5.3
- BuddyPress version: 12.5.0
- BuddyPress Template: Legacy
- Theme: Twenty Twenty-Four
- Plugins active: BuddyPress, JSON Basic Authentication (https://github.com/WP-API/Basic-Auth)
- PHP: 7.4
Thanks.
Attachments (2)
Change History (11)
#2
@
5 months ago
Pull request: https://github.com/buddypress/BP-REST/pull/510
This is the fix that makes sure the raw
data respects the schema for the message and requires the edit
context.
#3
@
5 months ago
- Component changed from REST API to Messages
- Milestone changed from Awaiting Review to Up Next
@niftythree
I think our documentation can do a better job here.
But if you look at the schema of the endpoint, the
raw
value of those fields are only available if you use theedit
context.The fact that the
raw
data is present in themessages
field (without theedit
context) is actually a bug you just brought to my attention, and that we should fix.