fix(kanban): preserve notifier_profile for dashboard home subscriptions

This commit is contained in:
Zyrixtrex 2026-05-18 20:14:39 -07:00 committed by Teknium
parent afae2dd9ec
commit 326c15d955
3 changed files with 53 additions and 0 deletions

View file

@ -4762,6 +4762,18 @@ def add_notify_sub(
""",
(task_id, platform, chat_id, thread_id or "", user_id, notifier_profile, now),
)
if notifier_profile:
# Self-heal legacy rows that predate notifier ownership by
# backfilling only when the existing value is unset.
conn.execute(
"""
UPDATE kanban_notify_subs
SET notifier_profile = ?
WHERE task_id = ? AND platform = ? AND chat_id = ? AND thread_id = ?
AND (notifier_profile IS NULL OR notifier_profile = '')
""",
(notifier_profile, task_id, platform, chat_id, thread_id or ""),
)
def list_notify_subs(