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

EmoteManagerImpl#finalizeData resets the role list before serializing #1143

Merged
merged 2 commits into from
Nov 24, 2019
Merged

EmoteManagerImpl#finalizeData resets the role list before serializing #1143

merged 2 commits into from
Nov 24, 2019

Conversation

averen
Copy link
Contributor

@averen averen commented Nov 22, 2019

Pull Request Etiquette

Changes

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

Closes Issue: NaN

Description

When the EmoteManager is reset in EmoteManagerImpl#finalizeData, the role list is still referenced by the DataObject, clearing it before the rest action serializes it. This means that an empty list is always sent to Discord no matter the contents provided in EmoteManager#setRoles(Set<Role>).

State before reset() is called:

before-reset

State after reset() is called:

after-reset

@MinnDevelopment MinnDevelopment added this to the v4.1.0 milestone Nov 24, 2019
@MinnDevelopment MinnDevelopment merged commit 0a4532b into discord-jda:development Nov 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants