fix(gateway): widen cron namespace-collision fix to all migrated adapters

#49431 corrected parents[2]->parents[3] for discord + raft only. The same
bug existed in slack, whatsapp, and telegram adapters (migrated from
gateway/platforms/ in 5600105478): each inserts parents[2] = plugins/ onto
sys.path[0], shadowing the real cron/ package with plugins/cron/ so
'import cron.scheduler_provider' raises ModuleNotFoundError on gateway start.

Fixes #49410, #49824.
This commit is contained in:
teknium1 2026-06-20 19:57:26 -07:00 committed by Teknium
parent 4c206b972d
commit 79f297834a
3 changed files with 3 additions and 3 deletions

View file

@ -34,7 +34,7 @@ except ImportError:
import sys
from pathlib import Path as _Path
sys.path.insert(0, str(_Path(__file__).resolve().parents[2]))
sys.path.insert(0, str(_Path(__file__).resolve().parents[3]))
from gateway.config import Platform, PlatformConfig
from gateway.platforms.helpers import MessageDeduplicator

View file

@ -63,7 +63,7 @@ except ImportError:
import sys
from pathlib import Path as _Path
sys.path.insert(0, str(_Path(__file__).resolve().parents[2]))
sys.path.insert(0, str(_Path(__file__).resolve().parents[3]))
from gateway.config import Platform, PlatformConfig
from gateway.platforms.base import (

View file

@ -178,7 +178,7 @@ def _terminate_bridge_process(proc, *, force: bool = False) -> None:
return
import sys
sys.path.insert(0, str(Path(__file__).resolve().parents[2]))
sys.path.insert(0, str(Path(__file__).resolve().parents[3]))
from gateway.config import Platform, PlatformConfig
from gateway.platforms.whatsapp_common import WhatsAppBehaviorMixin