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
|
return
|
||||||
|
|
||||||
# Determine response channel (voice, chat, or both)
|
# Determine response channel (voice, chat, or both)
|
||||||
# Normalize to string for reliable comparison (model_copy may skip enum coercion)
|
# Extract the raw value: enum.value gives "voice", str(enum) gives "TeamsbotResponseChannel.voice"
|
||||||
channelStr = str(self.config.responseChannel).lower().strip()
|
channelRaw = self.config.responseChannel
|
||||||
logger.info(f"Response channel: '{channelStr}' (raw={self.config.responseChannel!r})")
|
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")
|
sendVoice = channelStr in ("voice", "both")
|
||||||
sendChat = channelStr in ("chat", "both")
|
sendChat = channelStr in ("chat", "both")
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue