From f414df3a56dc605a8fcfb4c86b0e407584e84ee3 Mon Sep 17 00:00:00 2001 From: flobo3 Date: Sun, 19 Apr 2026 13:01:00 +0300 Subject: [PATCH] fix(slack): include team_id in thread-context cache key --- gateway/platforms/slack.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gateway/platforms/slack.py b/gateway/platforms/slack.py index 097aab9d2e..149b150fdc 100644 --- a/gateway/platforms/slack.py +++ b/gateway/platforms/slack.py @@ -1526,7 +1526,7 @@ class SlackAdapter(BasePlatformAdapter): Returns a formatted string with prior thread history, or empty string on failure or if the thread has no prior messages. """ - cache_key = f"{channel_id}:{thread_ts}" + cache_key = f"{channel_id}:{thread_ts}:{team_id}" now = time.monotonic() cached = self._thread_context_cache.get(cache_key) if cached and (now - cached.fetched_at) < self._THREAD_CACHE_TTL: @@ -1656,7 +1656,7 @@ class SlackAdapter(BasePlatformAdapter): Returns empty string on any failure — callers should treat an empty return as "no parent context to inject". """ - cache_key = f"{channel_id}:{thread_ts}" + cache_key = f"{channel_id}:{thread_ts}:{team_id}" now = time.monotonic() cached = self._thread_context_cache.get(cache_key) if cached and (now - cached.fetched_at) < self._THREAD_CACHE_TTL: