From d60ff11e04b1023d05c3b0e74b485814b942ca18 Mon Sep 17 00:00:00 2001 From: "alexei.dolgolyov" Date: Sat, 7 Feb 2026 12:26:47 +0300 Subject: [PATCH] Add telegram_media_delay between consecutive messages Add delays between text and media messages within each notification, and between periodic summary, scheduled assets, and memory mode when they trigger at the same hour. Co-Authored-By: Claude Opus 4.6 --- Common/Immich Album Watcher/blueprint.yaml | 36 ++++++++++++++++++++++ manifest.json | 2 +- 2 files changed, 37 insertions(+), 1 deletion(-) diff --git a/Common/Immich Album Watcher/blueprint.yaml b/Common/Immich Album Watcher/blueprint.yaml index 2473817..f0be918 100644 --- a/Common/Immich Album Watcher/blueprint.yaml +++ b/Common/Immich Album Watcher/blueprint.yaml @@ -1446,6 +1446,14 @@ action: disable_web_page_preview: "{{ telegram_disable_url_preview }}" chat_action: "{{ telegram_chat_action }}" + # Delay between periodic summary and scheduled assets if both trigger at the same hour + - if: + - condition: template + value_template: "{{ should_send_periodic_summary and should_send_scheduled_assets }}" + then: + - delay: + milliseconds: "{{ telegram_media_delay }}" + # --------------------------------------------------------------------------- # SCHEDULED ASSETS: Send notifications with assets from tracked albums # --------------------------------------------------------------------------- @@ -1684,6 +1692,10 @@ action: - variables: scheduled_reply_to_id: "{{ telegram_scheduled_text_response[current_album_entity].message_id | default(0) | int }}" + # Delay before sending media + - delay: + milliseconds: "{{ telegram_media_delay }}" + # Send media if we have URLs - choose: - conditions: @@ -1937,6 +1949,10 @@ action: - variables: combined_reply_to_id: "{{ telegram_combined_text_response[album_id_entities[0]].message_id | default(0) | int }}" + # Delay before sending media + - delay: + milliseconds: "{{ telegram_media_delay }}" + - choose: - conditions: - condition: template @@ -1957,6 +1973,14 @@ action: wait_for_response: false chat_action: "{{ telegram_chat_action }}" + # Delay before memory mode if another scheduled notification was sent at the same hour + - if: + - condition: template + value_template: "{{ (should_send_scheduled_assets or should_send_periodic_summary) and should_send_memory_mode }}" + then: + - delay: + milliseconds: "{{ telegram_media_delay }}" + # --------------------------------------------------------------------------- # MEMORY MODE: Send "On This Day" memories from tracked albums # --------------------------------------------------------------------------- @@ -2190,6 +2214,10 @@ action: - variables: memory_reply_to_id: "{{ telegram_memory_text_response[memory_current_album_entity].message_id | default(0) | int }}" + # Delay before sending media + - delay: + milliseconds: "{{ telegram_media_delay }}" + # Send media if we have URLs - choose: - conditions: @@ -2433,6 +2461,10 @@ action: - variables: memory_comb_reply_to_id: "{{ telegram_memory_comb_text_response[album_id_entities[0]].message_id | default(0) | int }}" + # Delay before sending media + - delay: + milliseconds: "{{ telegram_media_delay }}" + - choose: - conditions: - condition: template @@ -2823,6 +2855,10 @@ action: - variables: reply_to_message_id: "{{ telegram_text_response[album_id_entities[0]].message_id | default(0) | int }}" + # Delay before sending media + - delay: + milliseconds: "{{ telegram_media_delay }}" + # Send media if we have URLs - choose: - conditions: diff --git a/manifest.json b/manifest.json index b1ca6e4..94b9652 100644 --- a/manifest.json +++ b/manifest.json @@ -1,3 +1,3 @@ { - "version": "1.31.1" + "version": "1.33.1" }