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 UserData when possible #898

Merged
merged 1 commit into from May 23, 2021
Merged

Use UserData when possible #898

merged 1 commit into from May 23, 2021

Conversation

Shadorc
Copy link
Contributor

@Shadorc Shadorc commented Apr 17, 2021

Description:

  • PrivateChannel#getRecipients returns Set<User> instead of Flux<User>
  • Invite#getInviter returns Optional<User> instead of Mono<User>
  • Inviter#getTargetUser returns Optional<User> instead of Mono<User>

Justification: There were already commits adressing the fact that UserData or MemberData are thrown away to just use the ID and request the full object to the gateway. This pull request aims to fix the last methods (that I could find) that do this. This is a breaking change without deprecation but I think it will be easier for users to manipulate Set and Optional rather than Flux and Mono.

@quanticc quanticc added API change Breaks public API in x.y releases, needs migration docs area/core Related to core module: events, entities, clients, specs enhancement Improvement over an existing feature labels Apr 18, 2021
@quanticc quanticc added this to the 3.2.0 milestone Apr 18, 2021
Copy link
Member

@darichey darichey left a comment

Choose a reason for hiding this comment

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

I'm fine with the breakage.

@quanticc quanticc mentioned this pull request May 23, 2021
24 tasks
@quanticc quanticc merged commit a863f95 into Discord4J:master May 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API change Breaks public API in x.y releases, needs migration docs area/core Related to core module: events, entities, clients, specs enhancement Improvement over an existing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants