fix(slack): include team_id in thread-context cache key

This commit is contained in:
flobo3
2026-04-26 12:35:16 -07:00
committed by Teknium
parent c0d25df311
commit f414df3a56
+2 -2
View File
@@ -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: