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(model): Deserialize unavailable guilds in GUILD_CREATE. #2330

Merged
merged 4 commits into from
May 7, 2024

Conversation

Erk-
Copy link
Member

@Erk- Erk- commented Mar 31, 2024

This changes GuildCreate from being a tuple struct to being a enum that can either be available or unavailable, and containing either a full Guild or a UnavailableGuild.

@github-actions github-actions bot added c-cache Affects the cache crate c-model Affects the model crate t-fix Fixes a bug in the library labels Mar 31, 2024
@Erk- Erk- force-pushed the erk/model/fix-unavailible-guilds-in-guild-create branch 2 times, most recently from aac819b to 48b1f66 Compare March 31, 2024 21:13
Copy link
Member

@Gelbpunkt Gelbpunkt left a comment

Choose a reason for hiding this comment

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

Correct me if I'm wrong, but I assume we don't test the cache's implementation of a guild going unavailable initially and then available again. Could that be added?

Erk- added 2 commits May 4, 2024 10:50
This changes GuildCreate from being a tuple struct to being a enum
that can either be available or unavailable, and containing either a
full Guild or a UnavailableGuild.
@Erk- Erk- force-pushed the erk/model/fix-unavailible-guilds-in-guild-create branch from a5c2202 to 26e14fa Compare May 4, 2024 08:51
@Erk- Erk- requested review from Gelbpunkt and laralove143 May 4, 2024 09:13
@Erk-
Copy link
Member Author

Erk- commented May 4, 2024

@Gelbpunkt Added a test now, which also made a small bug show up.

Copy link
Member

@laralove143 laralove143 left a comment

Choose a reason for hiding this comment

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

lgtm thank u for the pr

@Erk- Erk- merged commit 08ed124 into main May 7, 2024
9 checks passed
@Erk- Erk- deleted the erk/model/fix-unavailible-guilds-in-guild-create branch May 7, 2024 05:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c-cache Affects the cache crate c-model Affects the model crate t-fix Fixes a bug in the library
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants