discord-api-docs icon indicating copy to clipboard operation
discord-api-docs copied to clipboard

Forum tags can be applied to the same thread multiple times

Open shiftinv opened this issue 1 year ago • 0 comments

Description

Unlike the client, the API doesn't seem to deduplicate tag IDs; PATCHing a forum thread with "applied_tags": [123, 123] applies that same tag twice. The client displays repeated tags fine, editing that thread's tags results in them being deduplicated on the client side.

Steps to Reproduce

$ curl -X PATCH -H "$AUTH" -H "Content-Type: application/json" \
  -d '{"applied_tags": ["977184348098920458", "977184348098920458"]}' \
  https://discord.com/api/v10/channels/<thread id>
{
  ...,
  "applied_tags": [
    "977184348098920458",
    "977184348098920458"
  ]
}

Expected Behavior

Forum tags should probably be deduplicated on the API side before being applied to a thread.

Current Behavior

The same tag can be applied several times, up to the total limit of 5.

Screenshots/Videos

image

Client and System Information

n/a

shiftinv avatar Sep 01 '22 14:09 shiftinv