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

Missing field "pending" in Guild Member Update #2567

Closed
AsianIntel opened this issue Feb 2, 2021 · 4 comments
Closed

Missing field "pending" in Guild Member Update #2567

AsianIntel opened this issue Feb 2, 2021 · 4 comments
Labels

Comments

@AsianIntel
Copy link

Description
Some GUILD_MEMBER_UPDATE events do not seem to include the pending field.

Steps to reproduce
The pending field is missing when any user changes their avatar/profile picture (from my debugging at least)

Expected Behavior
The pending field should be included as per #2396 (comment)

Current Behavior
The pending field doesn't get included

Log received from the gateway:
{"t":"GUILD_MEMBER_UPDATE","s":100,"op":0,"d":{"user":{"username":"...","public_flags":64,"id":"331804882837176322","discriminator":"1122","avatar":"a_684331f516e9a0aa3 012ce06eab866a2"},"roles":["665325651728793600"],"mute":false,"joined_at":"2020-11-04T22:53:24.007000+00:00","hoisted_role":"665325651728793600","guild_id":"576325772629901312","deaf":false}}

@AsianIntel AsianIntel added the bug label Feb 2, 2021
@MinnDevelopment
Copy link
Contributor

The documentation for GUILD_MEMBER_UPDATE says that pending is an optional field.

@advaith1
Copy link
Member

advaith1 commented Feb 2, 2021

pretty sure it should be required; that's my fault

In GUILD_ events, pending will always be included as true or false. In non GUILD_ events which can only be triggered by non-pending users, pending will not be included.

this seems to be an actual bug

@rickling
Copy link
Contributor

rickling commented Feb 17, 2021

We're looking into refactoring & improving how pending works right now per feedback from the community.

So.... this is a wontfix for now. Stay tuned.

@advaith1 is right that this is an actual bug.

Erk- pushed a commit to twilight-rs/twilight that referenced this issue Feb 21, 2021
Add #[serde(default)] to the `pending` field on guild member updates.
This had to be done as the bug that happens is currently a wontfix from
Discord as they work of a better suited replacement.

discord/discord-api-docs#2567 (comment)

Approved-by: Valdemar Erk <valdemar@erk.io>
Approved-by: Jens Reidel <adrian@travitia.xyz>
Co-authored-by: Jens Reidel <adrian@travitia.xyz>
Signed-off-by: Gautam Abhyankar <gautam.abhyankar@gmail.com>
@night
Copy link
Member

night commented Apr 9, 2021

Closing this as a wontfix per above.

@night night closed this as completed Apr 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants