From c36916f4e78096aaa8b46c99927336d66b14acee Mon Sep 17 00:00:00 2001 From: Mirco Wittrien Date: Tue, 20 Jun 2023 09:30:24 +0200 Subject: [PATCH] Update FriendNotifications.plugin.js --- Plugins/FriendNotifications/FriendNotifications.plugin.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Plugins/FriendNotifications/FriendNotifications.plugin.js b/Plugins/FriendNotifications/FriendNotifications.plugin.js index 32c3159d09..6ea6e9d2aa 100644 --- a/Plugins/FriendNotifications/FriendNotifications.plugin.js +++ b/Plugins/FriendNotifications/FriendNotifications.plugin.js @@ -838,8 +838,8 @@ module.exports = (_ => { let string = this.settings.notificationStrings[screensharingNotice ? "screensharing" : customChanged ? "custom" : loginNotice ? "login" : status.name] || "'$user' changed status to '$status'"; let hasUserPlaceholder = string.indexOf("$user") > -1; let toastString = BDFDB.StringUtils.htmlEscape(string) - .replace(/'{0,1}\$user'{0,1}/g, `${BDFDB.StringUtils.htmlEscape(name)}${this.settings.general.showDiscriminator ? ("#" + user.discriminator) : ""}`) - .replace(/'{0,1}\$nick'{0,1}/g, nickname ? `${BDFDB.StringUtils.htmlEscape(nickname)}${!hasUserPlaceholder && this.settings.general.showDiscriminator ? ("#" + user.discriminator) : ""}` : !hasUserPlaceholder ? `${BDFDB.StringUtils.htmlEscape(name)}${this.settings.general.showDiscriminator ? ("#" + user.discriminator) : ""}` : "") + .replace(/'{0,1}\$user'{0,1}/g, `${BDFDB.StringUtils.htmlEscape(name)}${this.settings.general.showDiscriminator && user.discriminator ? ("#" + user.discriminator) : ""}`) + .replace(/'{0,1}\$nick'{0,1}/g, nickname ? `${BDFDB.StringUtils.htmlEscape(nickname)}${!hasUserPlaceholder && this.settings.general.showDiscriminator && user.discriminator ? ("#" + user.discriminator) : ""}` : !hasUserPlaceholder ? `${BDFDB.StringUtils.htmlEscape(name)}${this.settings.general.showDiscriminator && user.discriminator ? ("#" + user.discriminator) : ""}` : "") .replace(/'{0,1}\$statusOld'{0,1}/g, `${oldStatusName}`) .replace(/'{0,1}\$status'{0,1}/g, `${statusName}`); if (status.activity) {