From 69637194990592e9261eafb153dd4fab95c9506a Mon Sep 17 00:00:00 2001 From: patrick-motsch Date: Wed, 18 Feb 2026 00:48:41 +0100 Subject: [PATCH] fix: use enum .value for responseChannel comparison - was silently dropping all responses Co-authored-by: Cursor --- modules/features/teamsbot/service.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/modules/features/teamsbot/service.py b/modules/features/teamsbot/service.py index 83e7a251..5457758e 100644 --- a/modules/features/teamsbot/service.py +++ b/modules/features/teamsbot/service.py @@ -714,9 +714,10 @@ class TeamsbotService: return # Determine response channel (voice, chat, or both) - # Normalize to string for reliable comparison (model_copy may skip enum coercion) - channelStr = str(self.config.responseChannel).lower().strip() - logger.info(f"Response channel: '{channelStr}' (raw={self.config.responseChannel!r})") + # Extract the raw value: enum.value gives "voice", str(enum) gives "TeamsbotResponseChannel.voice" + channelRaw = self.config.responseChannel + channelStr = (channelRaw.value if hasattr(channelRaw, 'value') else str(channelRaw)).lower().strip() + logger.info(f"Response channel: '{channelStr}' (raw={channelRaw!r})") sendVoice = channelStr in ("voice", "both") sendChat = channelStr in ("chat", "both")