Skip to content

Commit 439dc87

Browse files
Robclaude
andcommitted
fix(telegram): restrict legacy template migration to Telegram preset only
VK users with the old default template were silently getting {status_emoji} added on the next app load. Restrict the migration to PRESET_TELEGRAM_BOT; new VK destinations already get DEFAULT_CHAT_TEMPLATE via defaultTemplate(). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 6a5dc70 commit 439dc87

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Common/src/main/java/tk/glucodata/OutboundApiSettings.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -579,9 +579,9 @@ object OutboundApiSettings {
579579
headers = item.optString("headers", ""),
580580
messageTemplate = run {
581581
val stored = item.optString("messageTemplate", defaultTemplate(preset))
582-
// Migrate the old default (pre-status-emoji) to the current default.
582+
// Migrate the old Telegram default (pre-status-emoji) to the current default.
583583
if (stored == LEGACY_CHAT_TEMPLATE &&
584-
(preset == PRESET_TELEGRAM_BOT || preset == PRESET_VK_MESSAGES)
584+
preset == PRESET_TELEGRAM_BOT
585585
) DEFAULT_CHAT_TEMPLATE else stored
586586
},
587587
minIntervalMinutes = item.optInt(

0 commit comments

Comments
 (0)