fix: use enum .value for responseChannel comparison - was silently dropping all responses
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
a3b771b12a
commit
6963719499
1 changed files with 4 additions and 3 deletions
|
|
@ -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")
|
||||
|
|
|
|||
Loading…
Reference in a new issue