(channelId: string | null | undefined)
| 39 | }; |
| 40 | |
| 41 | function getGuildIdForChannel(channelId: string | null | undefined): string | null { |
| 42 | if (!channelId) return null; |
| 43 | try { |
| 44 | const channel = ChannelStore.getChannel(channelId) as { getGuildId?: () => string | null; guild_id?: string | null; } | null; |
| 45 | return channel?.getGuildId?.() ?? channel?.guild_id ?? null; |
| 46 | } catch { |
| 47 | return null; |
| 48 | } |
| 49 | } |
| 50 | |
| 51 | function shouldInterceptUploadFiles(files: readonly File[], guildId: string | null): boolean { |
| 52 | if (!settings.store.bypassDiscordUploadOnlyOverLimit) return true; |
no outgoing calls
no test coverage detected