-
Notifications
You must be signed in to change notification settings - Fork 2.6k
fix(gateway): GatewayConfig.get() AttributeError crashes all Telegram/Discord message handling #1158
Copy link
Copy link
Closed
Description
Bug
In gateway/run.py around line 1004, the code calls self.config.get("quick_commands", {}) treating self.config as a dict. However self.config is a GatewayConfig object (defined in gateway/config.py) which has no .get() method.
This causes every single incoming Telegram and Discord message to fail silently — the gateway appears to be running but never responds.
Traceback
File "/root/.hermes/hermes-agent/gateway/platforms/base.py", line 700, in _process_message_background
response = await self._message_handler(event)
File "/root/.hermes/hermes-agent/gateway/run.py", line 1004, in _handle_message
quick_commands = self.config.get("quick_commands", {})
AttributeError: 'GatewayConfig' object has no attribute 'get'
[Telegram] Error handling message: 'GatewayConfig' object has no attribute 'get'
Fix
# Before
quick_commands = self.config.get("quick_commands", {})
# After
quick_commands = getattr(self.config, "quick_commands", {}) if not isinstance(self.config, dict) else self.config.get("quick_commands", {})Or simply: quick_commands = getattr(self.config, 'quick_commands', {})
Impact
All Telegram/Discord users on a default Hermes install will experience this — bot receives messages but never replies.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels