### Problem Currently, the attachment button visibility in the widget uses both the SDK's `enableFileUpload` flag AND the inbox's attachment settings with an AND condition. This creates an issue for users who want to control attachments solely through inbox settings, since the SDK flag defaults to `true` even when not explicitly provided. **Before:** - SDK not set → `enableFileUpload: true` (default) + inbox setting = attachment shown only if both true - SDK set to false → `enableFileUpload: false` + inbox setting = attachment always hidden - SDK set to true → `enableFileUpload: true` + inbox setting = attachment shown only if both true This meant users couldn't rely solely on inbox settings when the SDK flag wasn't explicitly provided. ### Solution Changed the logic to prioritize explicit SDK configuration when provided, and fall back to inbox settings when not provided: **After:** - SDK not set → `enableFileUpload: undefined` → use inbox setting only - SDK set to false → `enableFileUpload: false` → hide attachment (SDK controls) - SDK set to true → `enableFileUpload: true` → show attachment (SDK controls) --------- Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>
7.0 KiB
Executable File
7.0 KiB
Executable File