50509: Programmable Chat: Media message body cannot be updated
CHAT
ERROR
This error occurs when you try to update the Body of a media message in Programmable Chat. Media messages store the attachment separately from the message record, do not support a per-message text body, and use a service-defined placeholder body for legacy clients.
- You sent an update request with the
Bodyparameter for a message whosetypeismedia. - The message was created with an attached media object, such as a
MediaSid, and your application later tried to edit it like a text-only message. - Your application uses the same update logic for both text messages and media messages without checking the message type first.
- Do not update
Bodyon media messages. Update only supported non-body fields, such asAttributes, when you need to change message metadata. - Check the message
typebefore updating it. Only sendBodyupdates for text messages. - If you need to include text with an attachment, send a separate text message in the channel instead of trying to edit the media message body.
- If the media message was created incorrectly, delete the message and create a new one with the correct attachment.
- When sending media over the REST API, upload the file first and create the message with
MediaSidinstead of creating a media message and then attempting to rewrite its body.