Merge remote-tracking branch 'upstream/dev' into dev
Some checks failed
Release / Build Equicord (push) Has been cancelled
Test / Test (push) Has been cancelled

This commit is contained in:
thororen1234 2025-05-31 10:01:41 -04:00
commit ad68c06975
No known key found for this signature in database

View file

@ -526,10 +526,10 @@ export default definePlugin({
isHiddenChannel(channel: Channel & { channelId?: string; }, checkConnect = false) {
try {
if (!channel) return false;
if (channel == null || Object.hasOwn(channel, "channelId") && channel.channelId == null) return false;
if (channel.channelId) channel = ChannelStore.getChannel(channel.channelId);
if (!channel || channel.isDM() || channel.isGroupDM() || channel.isMultiUserDM()) return false;
if (channel.channelId != null) channel = ChannelStore.getChannel(channel.channelId);
if (channel == null || channel.isDM() || channel.isGroupDM() || channel.isMultiUserDM()) return false;
return !PermissionStore.can(PermissionsBits.VIEW_CHANNEL, channel) || checkConnect && !PermissionStore.can(PermissionsBits.CONNECT, channel);
} catch (e) {