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

Use deep copy for layout components when applying message data #2236

Merged
merged 8 commits into from Nov 8, 2022

Conversation

freya022
Copy link
Contributor

@freya022 freya022 commented Sep 1, 2022

Pull Request Etiquette

Changes

  • Internal code
  • Library interface (affecting end-user code)
  • Documentation
  • Other: _____

Closes Issue: #2234

Description

This PR fixes layout components being copied by reference, which allowed modifications to carry over duplicated messages

@freya022 freya022 marked this pull request as draft November 2, 2022 13:34
@DV8FromTheWorld
Copy link
Member

Getting some kind of fix out that addresses the components part of this problem seems like a small win that we should push forward with. @MinnDevelopment do you have any other suggestions on how to proceed on this? Seems like we could just drop files and mention that they're dropped in the copy process?

@MinnDevelopment
Copy link
Member

I'm fine moving forward with it as long as we limit it to components.

@freya022 freya022 marked this pull request as ready for review November 5, 2022 19:53
Copy link
Member

@MinnDevelopment MinnDevelopment left a comment

Choose a reason for hiding this comment

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

This also needs to handle some more cases where components are copied, such as MessageEditRequest#applyCreateData/applyData and MessageCreateRequest#applyEditData.

@MinnDevelopment MinnDevelopment changed the title Copy layout components & file uploads when applying message create data Use deep copy for layout components when applying message data Nov 5, 2022
@MinnDevelopment MinnDevelopment added type: enhancement type: semi-breaking this might change internals in a non-comptible way labels Nov 5, 2022
@MinnDevelopment MinnDevelopment merged commit f181320 into discord-jda:master Nov 8, 2022
@freya022 freya022 deleted the fix/message-copy branch April 11, 2024 09:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement type: semi-breaking this might change internals in a non-comptible way
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants