Skip to content

Components field is allowed in a forwarded message #7551

Open
@proxydyzed

Description

@proxydyzed

Description

Making a POST /channels/{channel_id}/messages request with type set to 1 (FORWARDED) in the message_reference field of the payload returns an error if content field is also set, but the components field does not return an error.
Sending components field with buttons / select-menus in the payload casues unexpected behavior.
The components are rendered on my laptop but not in my iPad.
With the new components-v2, setting the IS_COMPONENTS_V2 flag and sending a TextDisplay component in the components field causes the same unexpected behavior.

Steps to Reproduce

  1. Send a payload like the following with appropriate channel_id, message_id, and guild_id.
{
  "flags": 32768,
  "message_reference": {
    "type": 1,
    "message_id": "...",
    "channel_id": "...",
    "guild_id": "...",
    "fail_if_not_exists": true
  },
  "components": [
    {
      "type": 10,
      "content": "This should not be possible"
    },
    {
      "type": 1,
      "components": [
        {
          "type": 2,
          "style": 1,
          "custom_id": "custom_id",
          "label": "Button"
        }
      ]
    }
  ]
}

Expected Behavior

Should return an error.

Current Behavior

Does not return an error, rather returns success.
On the client side the message has a forwarded message along with the text display component below it.
Works with any component in the components array.

Screenshots/Videos

Image

Client and System Information

stable 398278 (43734eb) Host 1.0.9191 x64 (63170) Build Override: N/A Windows 10 64-bit (10.0.19045)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions