Skip to content

Commit b85135f

Browse files
committed
fix: call compressImageHandler unconditionally (it checks settings internally)
1 parent 1d343ae commit b85135f

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/lib/components/channel/MessageInput.svelte

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -412,9 +412,7 @@
412412
let imageUrl = event.target.result;
413413
414414
// Compress the image if settings or config require it
415-
if ($settings?.imageCompression && $settings?.imageCompressionInChannels) {
416-
imageUrl = await compressImageHandler(imageUrl, $settings, $config);
417-
}
415+
imageUrl = await compressImageHandler(imageUrl, $settings, $config);
418416
419417
const blob = await (await fetch(imageUrl)).blob();
420418
const compressedFile = new File([blob], file.name, { type: file.type });

0 commit comments

Comments
 (0)