mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-07 05:42:55 -04:00
Merge remote-tracking branch 'upstream/dev' into dev
This commit is contained in:
commit
ad68c06975
1 changed files with 3 additions and 3 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue