(files: readonly File[], guildId: string | null)
| 49 | } |
| 50 | |
| 51 | function shouldInterceptUploadFiles(files: readonly File[], guildId: string | null): boolean { |
| 52 | if (!settings.store.bypassDiscordUploadOnlyOverLimit) return true; |
| 53 | |
| 54 | try { |
| 55 | return Boolean(discordFilesExceedLimit(files, guildId)); |
| 56 | } catch { |
| 57 | const fallbackLimit = getUserMaxFileSize(UserStore.getCurrentUser()); |
| 58 | return files.some(file => file.size > Math.max(0, fallbackLimit)); |
| 59 | } |
| 60 | } |
| 61 | function extractFilesFromValue(value: unknown): File[] { |
| 62 | if (value instanceof File) return [value]; |
| 63 |
no outgoing calls
no test coverage detected