aboutsummaryrefslogtreecommitdiff
path: root/src/model
diff options
context:
space:
mode:
authorAustin Hellyer <[email protected]>2016-12-15 12:46:27 -0800
committerAustin Hellyer <[email protected]>2016-12-15 12:46:27 -0800
commit0708ccf85bac347e59053133a2b8b6f2eabe99ba (patch)
tree1deab8231d48b05495c08d34b0d7eace954a0a6a /src/model
parentRelease v0.1.3 for some hotfixes (diff)
downloadserenity-0708ccf85bac347e59053133a2b8b6f2eabe99ba.tar.xz
serenity-0708ccf85bac347e59053133a2b8b6f2eabe99ba.zip
Fix User::avatar_url + add Id display tests
User::avatar_url was formatting the user's Id as a mention, rather than the inner u64.
Diffstat (limited to 'src/model')
-rw-r--r--src/model/user.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/model/user.rs b/src/model/user.rs
index 9883bd1..af026ea 100644
--- a/src/model/user.rs
+++ b/src/model/user.rs
@@ -37,7 +37,7 @@ impl CurrentUser {
/// Returns the formatted URL of the user's icon, if one exists.
pub fn avatar_url(&self) -> Option<String> {
self.avatar.as_ref().map(|av|
- format!(cdn!("/avatars/{}/{}.jpg"), self.id, av))
+ format!(cdn!("/avatars/{}/{}.jpg"), self.id.0, av))
}
/// Edits the current user's profile settings.
@@ -101,7 +101,7 @@ impl User {
/// Returns the formatted URL of the user's icon, if one exists.
pub fn avatar_url(&self) -> Option<String> {
self.avatar.as_ref().map(|av|
- format!(cdn!("/avatars/{}/{}.jpg"), self.id, av))
+ format!(cdn!("/avatars/{}/{}.jpg"), self.id.0, av))
}
/// Gets user as `Member` of a guild.