Force global guest avatar if avatar string is null

This commit is contained in:
Jeremy Zhang 2017-10-09 17:56:00 +00:00
parent 76863cd017
commit bee067f8ec

View File

@ -833,7 +833,11 @@
Mustache.parse(template); Mustache.parse(template);
for (var i = messages.length-1; i >= 0; i--) { for (var i = messages.length-1; i >= 0; i--) {
var message = messages[i]; var message = messages[i];
if (message.author.avatar) {
var avatar = generate_avatar_url(message.author.id, message.author.avatar, message.content); var avatar = generate_avatar_url(message.author.id, message.author.avatar, message.content);
} else {
var avatar = global_guest_icon;
}
message = replace_message_mentions(message); message = replace_message_mentions(message);
message = format_bot_message(message); message = format_bot_message(message);
message = parse_message_time(message); message = parse_message_time(message);