Update FriendNotifications.plugin.js
This commit is contained in:
parent
e8ab557d75
commit
c36916f4e7
|
@ -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, `<strong>${BDFDB.StringUtils.htmlEscape(name)}</strong>${this.settings.general.showDiscriminator ? ("#" + user.discriminator) : ""}`)
|
||||
.replace(/'{0,1}\$nick'{0,1}/g, nickname ? `<strong>${BDFDB.StringUtils.htmlEscape(nickname)}</strong>${!hasUserPlaceholder && this.settings.general.showDiscriminator ? ("#" + user.discriminator) : ""}` : !hasUserPlaceholder ? `<strong>${BDFDB.StringUtils.htmlEscape(name)}</strong>${this.settings.general.showDiscriminator ? ("#" + user.discriminator) : ""}` : "")
|
||||
.replace(/'{0,1}\$user'{0,1}/g, `<strong>${BDFDB.StringUtils.htmlEscape(name)}</strong>${this.settings.general.showDiscriminator && user.discriminator ? ("#" + user.discriminator) : ""}`)
|
||||
.replace(/'{0,1}\$nick'{0,1}/g, nickname ? `<strong>${BDFDB.StringUtils.htmlEscape(nickname)}</strong>${!hasUserPlaceholder && this.settings.general.showDiscriminator && user.discriminator ? ("#" + user.discriminator) : ""}` : !hasUserPlaceholder ? `<strong>${BDFDB.StringUtils.htmlEscape(name)}</strong>${this.settings.general.showDiscriminator && user.discriminator ? ("#" + user.discriminator) : ""}` : "")
|
||||
.replace(/'{0,1}\$statusOld'{0,1}/g, `<strong>${oldStatusName}</strong>`)
|
||||
.replace(/'{0,1}\$status'{0,1}/g, `<strong>${statusName}</strong>`);
|
||||
if (status.activity) {
|
||||
|
|
Loading…
Reference in New Issue