File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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 don' t 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 ;
693693
694+ console .log (' [DEBUG compressImageHandler - Chat]' , {
695+ settingsCompression ,
696+ configWidth ,
697+ configHeight ,
698+ settings ,
699+ config: config ?.file
700+ });
701+
694702 // If neither settings nor config wants compression, return original URL.
695703 if (! settingsCompression && ! configWidth && ! configHeight ) {
704+ console .log (' [DEBUG] Early exit - no compression needed' );
696705 return imageUrl ;
697706 }
698707
727736 let imageUrl = event .target .result ;
728737
729738 // Compress the image if settings or config require it
730- if ($settings ?.imageCompression && $settings ?.imageCompressionInChannels ) {
731- imageUrl = await compressImageHandler (imageUrl , $settings , $config );
732- }
739+ imageUrl = await compressImageHandler (imageUrl , $settings , $config );
733740
734741 if ($temporaryChatEnabled ) {
735742 files = [
You can’t perform that action at this time.
0 commit comments