From e298853518317c4f9b51c372a51f4abad98574a4 Mon Sep 17 00:00:00 2001 From: chylex Date: Thu, 25 Jun 2020 13:58:35 +0200 Subject: [PATCH] Tweak how missing user tags are displayed in the viewer --- src/viewer/scripts/discord.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/viewer/scripts/discord.js b/src/viewer/scripts/discord.js index f7e6424..f98e3a3 100644 --- a/src/viewer/scripts/discord.js +++ b/src/viewer/scripts/discord.js @@ -121,6 +121,9 @@ var DISCORD = (function(){ if (property === "avatar"){ return value ? templateUserAvatar.apply(value) : ""; } + else if (property === "user.tag"){ + return value ? value : "????"; + } else if (property === "timestamp"){ return getHumanReadableTime(value); } @@ -151,7 +154,7 @@ var DISCORD = (function(){ processed = processed .replace(REGEX.formatUrl, "$1") .replace(REGEX.mentionChannel, (full, match) => "#"+STATE.getChannelName(match)+"") - .replace(REGEX.mentionUser, (full, match) => "@"+STATE.getUserName(match)+"") + .replace(REGEX.mentionUser, (full, match) => "@"+STATE.getUserName(match)+"") .replace(REGEX.customEmojiStatic, ":$1:") .replace(REGEX.customEmojiAnimated, ":$1:");