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

Client properties API #590

Merged
merged 8 commits into from
Dec 30, 2024
Merged

Client properties API #590

merged 8 commits into from
Dec 30, 2024

Conversation

kozabrada123
Copy link
Member

Implements a new approach to client properties from #584

Each ChorusUser now has its own ClientProperties struct, which contains telemetry data sent when identifying with the gateway and with every request to the HTTP API.

This also means every request includes three new headers: X-Super-Properties (the entire ClientProperties encoded in base 64), X-Discord-Locale (which is copied from ClientProperties.system_locale) and X-Debug-Options (which is set to a hard-coded value of bugReporterEnabled)

Internally this also removes the old api ChorusRequest::new in favor of ChorusRequest {}, along with refactoring how headers are set on all routes

@bitfl0wer
Copy link
Member

This looks really ergonomic upon first glance. Well done! :)

@kozabrada123 kozabrada123 merged commit c4407ef into dev Dec 30, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants