From b5cc19843c3610934aa576ed4ace22b9fe4866c8 Mon Sep 17 00:00:00 2001 From: Anish Sarkar <104695310+AnishSarkar22@users.noreply.github.com> Date: Mon, 1 Jun 2026 12:37:16 +0530 Subject: [PATCH] feat(gateway): include Slack in gateway maintenance --- surfsense_backend/app/tasks/celery_tasks/gateway_tasks.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/surfsense_backend/app/tasks/celery_tasks/gateway_tasks.py b/surfsense_backend/app/tasks/celery_tasks/gateway_tasks.py index 1c2bb166f..e227db71d 100644 --- a/surfsense_backend/app/tasks/celery_tasks/gateway_tasks.py +++ b/surfsense_backend/app/tasks/celery_tasks/gateway_tasks.py @@ -85,6 +85,13 @@ def gateway_health_check_task() -> None: if key in metadata: cursor_state[key] = metadata[key] account.cursor_state = cursor_state + elif account.platform == ExternalChatPlatform.SLACK: + cursor_state = dict(account.cursor_state or {}) + for key in ("team_id", "team", "bot_user_id", "bot_username"): + if key in metadata: + cursor_state[key] = metadata[key] + account.cursor_state = cursor_state + account.bot_username = metadata.get("bot_username") except Exception: logger.warning( "External chat health check failed platform=%s account_id=%s",