Guest members could have empty roles huh

This commit is contained in:
Jeremy Zhang 2018-01-16 11:08:54 +00:00
parent 10e3d39acf
commit ec6af49f5b

View File

@ -1202,9 +1202,11 @@
if (usr.avatar_url) { if (usr.avatar_url) {
parent.find(".authoravatar").prop("src", usr.avatar_url); parent.find(".authoravatar").prop("src", usr.avatar_url);
} }
parent.attr("discord_userid", usr.id); if (usr.roles) {
parent.attr("discord_userroles", usr.roles.join(" ")); parent.attr("discord_userroles", usr.roles.join(" "));
} }
parent.attr("discord_userid", usr.id);
}
collapse_messages(); collapse_messages();
} }