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

banner and accent_color are always null on a message author via REST #6861

Open
Jiralite opened this issue May 13, 2024 · 9 comments
Open

banner and accent_color are always null on a message author via REST #6861

Jiralite opened this issue May 13, 2024 · 9 comments
Labels

Comments

@Jiralite
Copy link
Contributor

Jiralite commented May 13, 2024

Description

banner and accent_color are returned for the message author when fetching a message. These properties always seem to be null.

Steps to Reproduce

  1. Find a message whose author has either a profile banner or a profile theme set
  2. Run the following replacing channel_id with a channel id and message_id with a message id:
    curl 'https://discord.com/api/v10/channels/channel_id/messages/message_id' \
    --request GET \
    --header 'Authorization: Bot <token>'
    

Expected Behavior

The fields should be populated correctly. Perhaps they should even be omitted per #3898 (comment).

Current Behavior

Both fields are always null.

Screenshots/Videos

No response

Client and System Information

curl 8.4.0 (x86_64-apple-darwin23.0) libcurl/8.4.0 (SecureTransport) LibreSSL/3.3.6 zlib/1.2.12 nghttp2/1.58.0

@Jiralite Jiralite added the bug label May 13, 2024
@yonilerner
Copy link
Member

The fields will not be present when null in the next API deploy

@yonilerner
Copy link
Member

Actually it turned out changing this was more trouble than I thought. Its not really a bug though, so Im just gonna leave it as-is

@Jiralite
Copy link
Contributor Author

Its not really a bug though, so Im just gonna leave it as-is

For clarity, are you saying that when a user has a banner and Discord says they do not, that is intended behaviour?

@yonilerner
Copy link
Member

Its intended behavior that this API does not return the banner information

@advaith1
Copy link
Contributor

incorrect null responses cause issues for libraries since their user processing would see that the field is null and then update the cached user object to change the field to null, assuming that the user's banner has been removed

@yonilerner
Copy link
Member

Is this affecting anyone in practice? IMO API requests shouldn't be updating stateful models, that's what the gateway events are for

@Rapptz
Copy link
Contributor

Rapptz commented May 14, 2024

API requests should have the most up to date state as much as possible, so it just makes sense to have this properly populated.

@Qjuh
Copy link
Contributor

Qjuh commented May 15, 2024

Is this affecting anyone in practice? IMO API requests shouldn't be updating stateful models, that's what the gateway events are for

This would be a reasonable way to go about this. If there actually was any gateway event that had the banner and accentColor properties this is about. But there isn’t. So API requests are the only way to update the state of them. If you instead implement a gateway event to send these on change I‘d be very happy to not change the data based on the API requests.

@yonilerner
Copy link
Member

Alright thanks for convincing me

@yonilerner yonilerner reopened this May 15, 2024
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