Add maximum asset size filter for Telegram media
- Add telegram_max_asset_size input (0-50 MB slider) - Pass max_asset_data_size parameter to send_telegram_notification - Allows filtering out large files before sending to Telegram - Set to 0 for no filtering (default Telegram 50 MB limit) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -145,11 +145,12 @@ When enabled, photos/videos are sent as media attachments to Telegram using the
|
||||
- Media is downloaded from Immich and uploaded to Telegram (bypasses CORS)
|
||||
- Large media lists are automatically split into multiple groups (2-10 items per group)
|
||||
- Optional chat action indicator (typing, uploading photo/video) while processing
|
||||
- Optional maximum asset size filter to skip large files
|
||||
|
||||
### Limitations
|
||||
|
||||
- Only assets with valid public URLs will be sent
|
||||
- Telegram has a 50 MB file size limit for media
|
||||
- Telegram has a 50 MB file size limit for media (configurable filter to skip large assets)
|
||||
- Optional video warning can be shown when videos are present
|
||||
- Media captions use the Image/Video Asset Templates
|
||||
|
||||
|
||||
@@ -442,6 +442,21 @@ blueprint:
|
||||
text:
|
||||
multiline: true
|
||||
|
||||
telegram_max_asset_size:
|
||||
name: Maximum Asset Size (MB)
|
||||
description: >
|
||||
Maximum file size in megabytes for assets sent to Telegram.
|
||||
Assets larger than this will be skipped.
|
||||
Telegram has a 50 MB limit, so values above 50 have no effect.
|
||||
Set to 0 for no size filtering (use Telegram's default limit).
|
||||
default: 0
|
||||
selector:
|
||||
number:
|
||||
min: 0
|
||||
max: 50
|
||||
unit_of_measurement: MB
|
||||
mode: slider
|
||||
|
||||
telegram_disable_url_preview:
|
||||
name: Disable URL Preview
|
||||
description: >
|
||||
@@ -933,6 +948,7 @@ variables:
|
||||
telegram_video_warning_template: !input telegram_video_warning
|
||||
telegram_disable_url_preview: !input telegram_disable_url_preview
|
||||
telegram_chat_action: !input telegram_chat_action
|
||||
telegram_max_asset_size: !input telegram_max_asset_size
|
||||
|
||||
# Periodic Summary Settings
|
||||
enable_periodic_summary: !input enable_periodic_summary
|
||||
@@ -1701,6 +1717,7 @@ action:
|
||||
reply_to_message_id: "{{ scheduled_reply_to_id }}"
|
||||
max_group_size: "{{ max_media_per_group }}"
|
||||
chunk_delay: "{{ telegram_media_delay }}"
|
||||
max_asset_data_size: "{{ telegram_max_asset_size | int * 1048576 }}"
|
||||
wait_for_response: false
|
||||
chat_action: "{{ telegram_chat_action }}"
|
||||
|
||||
@@ -1952,6 +1969,7 @@ action:
|
||||
reply_to_message_id: "{{ combined_reply_to_id }}"
|
||||
max_group_size: "{{ max_media_per_group }}"
|
||||
chunk_delay: "{{ telegram_media_delay }}"
|
||||
max_asset_data_size: "{{ telegram_max_asset_size | int * 1048576 }}"
|
||||
wait_for_response: false
|
||||
chat_action: "{{ telegram_chat_action }}"
|
||||
|
||||
@@ -2205,6 +2223,7 @@ action:
|
||||
reply_to_message_id: "{{ memory_reply_to_id }}"
|
||||
max_group_size: "{{ max_media_per_group }}"
|
||||
chunk_delay: "{{ telegram_media_delay }}"
|
||||
max_asset_data_size: "{{ telegram_max_asset_size | int * 1048576 }}"
|
||||
wait_for_response: false
|
||||
chat_action: "{{ telegram_chat_action }}"
|
||||
|
||||
@@ -2446,6 +2465,7 @@ action:
|
||||
reply_to_message_id: "{{ memory_comb_reply_to_id }}"
|
||||
max_group_size: "{{ max_media_per_group }}"
|
||||
chunk_delay: "{{ telegram_media_delay }}"
|
||||
max_asset_data_size: "{{ telegram_max_asset_size | int * 1048576 }}"
|
||||
wait_for_response: false
|
||||
chat_action: "{{ telegram_chat_action }}"
|
||||
|
||||
@@ -2849,5 +2869,6 @@ action:
|
||||
reply_to_message_id: "{{ reply_to_message_id }}"
|
||||
max_group_size: "{{ max_media_per_group }}"
|
||||
chunk_delay: "{{ telegram_media_delay }}"
|
||||
max_asset_data_size: "{{ telegram_max_asset_size | int * 1048576 }}"
|
||||
wait_for_response: false
|
||||
chat_action: "{{ telegram_chat_action }}"
|
||||
|
||||
Reference in New Issue
Block a user