Fix avatar url not rendering properly for mention

This commit is contained in:
Jeremy Zhang 2018-03-19 19:08:47 +00:00
parent 105fe24a40
commit 3d0ad729c1

View File

@ -1720,7 +1720,7 @@
all_users.push({ all_users.push({
"id": usr.id, "id": usr.id,
"avatar": usr.avatar, "avatar": usr.avatar,
"avatar_url": generate_avatar_url(usr.user_id, usr.avatar), "avatar_url": generate_avatar_url(usr.id, usr.avatar),
"username": usr.username, "username": usr.username,
"nickname": usr.nickname, "nickname": usr.nickname,
"discriminator": usr.discriminator "discriminator": usr.discriminator
@ -1737,7 +1737,7 @@
if (usr.id == all_users[i].id) { if (usr.id == all_users[i].id) {
var u = all_users[i]; var u = all_users[i];
u.avatar = usr.avatar; u.avatar = usr.avatar;
u.avatar_url = generate_avatar_url(usr.user_id, usr.avatar); u.avatar_url = generate_avatar_url(usr.id, usr.avatar);
u.username = usr.username; u.username = usr.username;
u.nickname = usr.nickname; u.nickname = usr.nickname;
u.discriminator = usr.discriminator; u.discriminator = usr.discriminator;
@ -1761,7 +1761,7 @@
all_users.push({ all_users.push({
"id": usr.id, "id": usr.id,
"avatar": usr.avatar, "avatar": usr.avatar,
"avatar_url": generate_avatar_url(usr.user_id, usr.avatar), "avatar_url": generate_avatar_url(usr.id, usr.avatar),
"username": usr.username, "username": usr.username,
"nickname": usr.nickname, "nickname": usr.nickname,
"discriminator": usr.discriminator "discriminator": usr.discriminator