Update NotificationSounds.plugin.js

This commit is contained in:
Mirco Wittrien 2022-09-19 10:37:34 +02:00
parent 03d30317d7
commit d4c9b8d1cb
1 changed files with 1 additions and 1 deletions

View File

@ -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 = channel.isThread() ? BDFDB.LibraryModules.ThreadConfigStore.isMuted(channel.id) : BDFDB.LibraryModules.MutedUtils.isGuildOrCategoryOrChannelMuted(guildId, channel.id);
const muted = BDFDB.ChannelUtils.isThread(channel) ? 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");