-
Notifications
You must be signed in to change notification settings - Fork 596
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
Update CurrentApplicationInfo
and add support for editing it
#3035
base: next
Are you sure you want to change the base?
Conversation
f298296
to
424af70
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use the provided to_vec function instead of importing it from serde_json.
Also you haven't added anything but the low level http interface? Http usually shouldn't be directly used and you should probably add a builder like how our other stuff interacts with http. |
424af70
to
0cee4cc
Compare
Pesky auto-import. Should be fixed now.
Right, so I'll make a |
It seems the |
5ba44d9
to
24ffd92
Compare
24ffd92
to
f2c1085
Compare
7f72d28
to
71ab298
Compare
20d45ab
to
8fd6b7e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
edit_current_appllication_info.rs -> edit_current_application_info.rs
8c6dd76
to
6a5d2a5
Compare
6a5d2a5
to
8ed3e32
Compare
8ed3e32
to
52057ba
Compare
I think everything in |
e871454
to
d05677b
Compare
a088f6e
to
1b63edf
Compare
/// Icon for the app | ||
pub fn icon(mut self, base64_image_data: String) -> Self { | ||
self.icon = Some(base64_image_data); | ||
self | ||
} | ||
|
||
/// Sets the default rich presence invite cover image using base64 image data. | ||
pub fn cover_image(mut self, base64_image_data: String) -> Self { | ||
self.cover_image = Some(base64_image_data); | ||
self | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rather than passing in base64 data manually as a String
, we should allow the user to decide the place they want to source the image from and convert it to base64 on their behalf, similar to how EditProfile::avatar
does it using CreateAttachment
.
#[serde(default)] | ||
pub cover_image: Option<FixedString>, | ||
pub cover_image: FixedString, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar to the application icon, the API returns a hash of a constant size, so this should use ImageHash
to store the hash inline. Also should be wrapped in an Option<...>
.
CurrentApplicationInfo
and add support for editing it
Fixes #2977