Compare commits

..
1 Commits
Author SHA1 Message Date
Abiba (pi) 715d54564f fix(zulip): pass Platform enum instead of string to BasePlatformAdapter.__init__
Root cause of 'str' object has no attribute 'value' error during connect():
the adapter passed a raw string 'zulip' to the base class's platform
parameter, which expects a Platform enum instance. When self.name was
accessed (calling self.platform.value.title()), the string had no .value
attribute.

Fix: import Platform from gateway.config and wrap with Platform('zulip').
2026-06-27 05:33:46 +00:00
+3 -3
View File
@@ -43,7 +43,7 @@ except ImportError:
HTTPX_AVAILABLE = False
httpx = None
from gateway.config import PlatformConfig
from gateway.config import Platform, PlatformConfig
from gateway.platforms.base import (
BasePlatformAdapter,
MessageEvent,
@@ -118,8 +118,8 @@ class ZulipAdapter(BasePlatformAdapter):
"""
def __init__(self, config: PlatformConfig):
platform_name = "zulip"
super().__init__(config=config, platform=platform_name)
platform = Platform("zulip")
super().__init__(config=config, platform=platform)
extra = config.extra or {}