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(GuildChannel): improve empty overwrite handling for permissionsLocked #5821

Merged
merged 3 commits into from Jun 11, 2021

Conversation

MattIPv4
Copy link
Contributor

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

Fixes #5819 by handling the edge case where there is an empty overwrite present on a channel and simply not present on the parent, or vice-versa.

(I should note that this fix only worked when I was actively fetching channel parents on each channel update from the API, but I think that's just a side-effect/requirement of the channels partial now)

Status and versioning classification:

  • Code changes have been tested against the Discord API, or there are no code changes
  • I know how to update typings and have done so, or typings don't need updating

@MattIPv4 MattIPv4 requested a review from SpaceEEC June 11, 2021 21:26
src/structures/GuildChannel.js Outdated Show resolved Hide resolved
Copy link
Member

@kyranet kyranet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could avoid a second iteration by changing [...overwriteIds].every to a for-of loop, but otherwise this is fine.

@iCrawl iCrawl requested a review from vladfrangu June 11, 2021 22:25
@iCrawl iCrawl merged commit 6df3623 into discordjs:master Jun 11, 2021
@iCrawl iCrawl added this to the Version 13 milestone Jun 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

GuildChannel#permissionsLocked does not handle empty overwrites
5 participants