Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(MessagePayload): guard against repliedUser property #8211

Conversation

kyranet
Copy link
Member

@kyranet kyranet commented Jul 1, 2022

Please describe the changes this PR makes and why it should be merged:

If a user specified allowedMentions.replied_user, it would be erroneously replaced with allowedMentions.repliedUser, which may not exist. This PR fixes that by checking against allowedMentions.repliedUser's existence, and does no operation (nor a clone) if it's not specified.

Also removed cloneObject since that was the last instance of it.

Status and versioning classification:

  • I know how to update typings and have done so, or typings don't need updating

@vercel
Copy link

vercel bot commented Jul 1, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Updated
discord-js ⬜️ Ignored (Inspect) Jul 1, 2022 at 10:40PM (UTC)

@iCrawl iCrawl merged commit fa010b5 into discordjs:main Jul 3, 2022
@kyranet kyranet deleted the fix/discord.js/message-payload/replied-user-handling branch July 7, 2022 21:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

5 participants