Skip to content

Commit d7d39f6

Browse files
committed
fix: Always call compressImageHandler for consistent image handling
- Let compressImageHandler internally decide whether to compress - Handles both user settings and admin config compression requirements
1 parent 405fae5 commit d7d39f6

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/lib/components/channel/MessageInput.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@
371371
372372
if (file['type'].startsWith('image/')) {
373373
const compressImageHandler = async (imageUrl, settings = {}, config = {}) => {
374-
// Quick shortcut so we don't do unnecessary work.
374+
// Quick shortcut so we dont do unnecessary work.
375375
const settingsCompression = settings?.imageCompression ?? false;
376376
const configWidth = config?.file?.image_compression?.width ?? null;
377377
const configHeight = config?.file?.image_compression?.height ?? null;

src/lib/components/chat/MessageInput.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -685,8 +685,8 @@
685685
return;
686686
}
687687
688-
const compressImageHandler = async (imageUrl, settings = {}, config = {}) => {
689-
// Quick shortcut so we don't do unnecessary work.
688+
const compressImageHandler = async (imageUrl, settings = {}, config = {}) => {
689+
// Quick shortcut so we dont do unnecessary work.
690690
const settingsCompression = settings?.imageCompression ?? false;
691691
const configWidth = config?.file?.image_compression?.width ?? null;
692692
const configHeight = config?.file?.image_compression?.height ?? null;

0 commit comments

Comments
 (0)