Merge pull request #766 from spanishflu-est1918/codex/telegram-topic-session-pr

Isolate Telegram forum topic sessions — each topic gets its own independent session key, history, and interrupt tracking. Progress, hygiene, and cron messages all route to the correct topic.
This commit is contained in:
Teknium 2026-03-11 03:14:43 -07:00 committed by GitHub
commit fe9da5280f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
17 changed files with 700 additions and 39 deletions

View file

@ -24,7 +24,7 @@ from pathlib import Path as _Path
sys.path.insert(0, str(_Path(__file__).resolve().parents[2]))
from gateway.config import Platform, PlatformConfig
from gateway.session import SessionSource
from gateway.session import SessionSource, build_session_key
# ---------------------------------------------------------------------------
@ -646,7 +646,7 @@ class BasePlatformAdapter(ABC):
if not self._message_handler:
return
session_key = event.source.chat_id
session_key = build_session_key(event.source)
# Check if there's already an active handler for this session
if session_key in self._active_sessions: