Update NotificationSounds.plugin.js

This commit is contained in:
Mirco Wittrien 2022-09-17 22:48:07 +02:00
parent 0dc6602d65
commit 1d882dca76
1 changed files with 2 additions and 2 deletions

View File

@ -2,7 +2,7 @@
* @name NotificationSounds
* @author DevilBro
* @authorId 278543574059057154
* @version 3.7.2
* @version 3.7.3
* @description Allows you to replace the native Sounds with custom Sounds
* @invite Jx3TjNS
* @donate https://www.paypal.me/MircoWittrien
@ -224,7 +224,7 @@ module.exports = (_ => {
if (message.author.id != BDFDB.UserUtils.me.id && !BDFDB.LibraryModules.RelationshipStore.isBlocked(message.author.id)) {
const channel = BDFDB.LibraryModules.ChannelStore.getChannel(message.channel_id);
const isGroupDM = channel.isGroupDM();
const muted = BDFDB.LibraryModules.MutedUtils.isGuildOrCategoryOrChannelMuted(guildId, channel.id);
const muted = channel.isThread() ? BDFDB.LibraryModules.ThreadConfigStore.isMuted(channel.id) : BDFDB.LibraryModules.MutedUtils.isGuildOrCategoryOrChannelMuted(guildId, channel.id);
const focused = document.hasFocus() && BDFDB.LibraryModules.LastChannelStore.getChannelId() == channel.id;
if (!guildId && !muted && !(choices[isGroupDM ? "groupdm" : "dm"].focus && focused)) {
this.fireEvent(isGroupDM ? "groupdm" : "dm");