Edit history

Earlier versions of Edit message (PATCH) endpoint does not allow for partial modifications without affecting embeds, newest first.

Current version | Edited by Rex
Changes
Already posted aboveRemoved: ### ChecksRemoved: Removed: - ☑ I searched existing issues.Removed: - ☑ I wrote this report in my own words, except for direct translation if needed.Removed:
Show

Edit message (PATCH) endpoint does not allow for partial modifications without affecting embeds

Summary

Despite the fact that a PATCH HTTP method should apply partial modification to a resource, using the `PATCH /channels/{channel.id}/messages/{message.id}` endpoint with only "content" field results in both the message content and embeds being fully replaced by the given payload, i.e. it affects fields that weren't provided. This is unexpected for a PATCH endpoint (+ it differs from Discord's behaviour of the same endpoint). I'd only expect embeds to be removed, if "embeds": [] was included in the payload. The same problem does not seem to appear, when doing the opposite - I can edit only embeds without the content being removed. NOTE: This is a repost of #280 - I can still reproduce the issue after Fluxer V2 release.

Steps to reproduce

  1. Send the following message to the channel (`POST
/channels/{channel.id}/messages`)
{"content": "Test", "embeds": [{"description": "text"}]}
  1. See that it has content and an embed:image
  2. Edit the message created in step 1 (`PATCH
/channels/{channel.id}/messages/{message.id}`)
{"content": "edit"}
  1. See that it no longer has an embed:image
--- Note that the same issue does not occur, if instead of editing content, you were to modify the embed with the following payload in step 3:
{"embeds": [{"description": "edit"}]}
The content remains: image (side note: there's no "(edited)" indicator in such a case)

Environment

This is an API issue, so not relevant.

Logs or screenshots

Already posted above
Edited by Rex
Changes
The same problem does not seem to appear, when doing the opposite - I can edit only embeds without the content being removed.Removed: NOTE: This is a repost of [#479](https://feedback.fluxer.com/p/280) - I can still reproduce the issue after Fluxer V2 release.Added: NOTE: This is a repost of [#280](https://feedback.fluxer.com/p/280) - I can still reproduce the issue after Fluxer V2 release.### Steps to reproduce
Show

Edit message (PATCH) endpoint does not allow for partial modifications without affecting embeds

Summary

Despite the fact that a PATCH HTTP method should apply partial modification to a resource, using the `PATCH /channels/{channel.id}/messages/{message.id}` endpoint with only "content" field results in both the message content and embeds being fully replaced by the given payload, i.e. it affects fields that weren't provided. This is unexpected for a PATCH endpoint (+ it differs from Discord's behaviour of the same endpoint). I'd only expect embeds to be removed, if "embeds": [] was included in the payload. The same problem does not seem to appear, when doing the opposite - I can edit only embeds without the content being removed. NOTE: This is a repost of #280 - I can still reproduce the issue after Fluxer V2 release.

Steps to reproduce

  1. Send the following message to the channel (`POST
/channels/{channel.id}/messages`)
{"content": "Test", "embeds": [{"description": "text"}]}
  1. See that it has content and an embed:image
  2. Edit the message created in step 1 (`PATCH
/channels/{channel.id}/messages/{message.id}`)
{"content": "edit"}
  1. See that it no longer has an embed:image
--- Note that the same issue does not occur, if instead of editing content, you were to modify the embed with the following payload in step 3:
{"embeds": [{"description": "edit"}]}
The content remains: image (side note: there's no "(edited)" indicator in such a case)

Environment

This is an API issue, so not relevant.

Logs or screenshots

Already posted above

Checks

  • ☑ I searched existing issues.
  • ☑ I wrote this report in my own words, except for direct translation if needed.
Original by Jackuczys
Show

Edit message (PATCH) endpoint does not allow for partial modifications without affecting embeds

Summary

Despite the fact that a PATCH HTTP method should apply partial modification to a resource, using the `PATCH /channels/{channel.id}/messages/{message.id}` endpoint with only "content" field results in both the message content and embeds being fully replaced by the given payload, i.e. it affects fields that weren't provided. This is unexpected for a PATCH endpoint (+ it differs from Discord's behaviour of the same endpoint). I'd only expect embeds to be removed, if "embeds": [] was included in the payload. The same problem does not seem to appear, when doing the opposite - I can edit only embeds without the content being removed. NOTE: This is a repost of #479 - I can still reproduce the issue after Fluxer V2 release.

Steps to reproduce

  1. Send the following message to the channel (`POST
/channels/{channel.id}/messages`)
{"content": "Test", "embeds": [{"description": "text"}]}
  1. See that it has content and an embed:image
  2. Edit the message created in step 1 (`PATCH
/channels/{channel.id}/messages/{message.id}`)
{"content": "edit"}
  1. See that it no longer has an embed:image
--- Note that the same issue does not occur, if instead of editing content, you were to modify the embed with the following payload in step 3:
{"embeds": [{"description": "edit"}]}
The content remains: image (side note: there's no "(edited)" indicator in such a case)

Environment

This is an API issue, so not relevant.

Logs or screenshots

Already posted above

Checks

  • ☑ I searched existing issues.
  • ☑ I wrote this report in my own words, except for direct translation if needed.