-
Notifications
You must be signed in to change notification settings - Fork 7
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 some gateway deserialization errors #577
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Spacebar servers have mention_count in ReadStateEntry as nullable, as well as not having the flags field This should probably be investigated further Reported by greysilly7 on the polyphony discord
Adds a public type which allows serializing one snowflake or an array of snowflakes. Useful for e.g. request guild members, where we can request either for one user or for multiple
Updates the RequsetGuildMembers gateway event, allows to query multiple user_ids and guild_ids using OneOrMoreSnowflakes type, update its documentation
See also #578 on why we aren't currently juts implementing them as types
thanks to MaddyUnderStars; this explanation seems to make sense considering we only need to know if we are ahead / behind the version, not when exactly it was accessed
kozabrada123
commented
Nov 21, 2024
It's worth noting that the tests pass locally for me, and it seems our CI is broken again |
kozabrada123
added
Type: Bug
Module: Gateway
Type: New gateway event
Relating to or adding a new GatewayEvent
Type: Maintenance
labels
Nov 21, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Module: Gateway
Type: Bug
Type: Maintenance
Type: New gateway event
Relating to or adding a new GatewayEvent
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
See the commits;
Opcode
enum instead of constants (4ed68ce)presences
inGuildMembersChunk
being an array, not a single value (4baecf9)activities
inPresenceUpdate
as an empty array when they are sent asnull
(1b20102)OneOrMoreSnowflakes
, allowGatewayRequestGuildMembers
to request multiple guild and user ids (644d3be, 85e922b)LazyRequest
(op 14) to use theSnowflake
type for ids instead of justString
(61ac7d1)last_viewed
inReadState
being a version / counter, not aDateTime
(fb94afa)