docs(qqbot): clarify comment on file upload guard

This commit is contained in:
Zioywishing 2026-05-31 13:57:20 +08:00 committed by Teknium
parent b5c2dc7cd2
commit fef1b8cbbe

View file

@ -1812,8 +1812,9 @@ class QQAdapter(BasePlatformAdapter):
fn = filename.strip().lower()
if ct == "voice" or ct.startswith("audio/"):
return True
# QQ file uploads have content_type="file" — never treat as voice,
# even if the filename has an audio extension.
# QQ file uploads have content_type="file". Without this guard,
# any uploaded audio file (e.g. .wav, .mp3) would be misrouted into
# the STT pipeline and never be received as a normal file attachment.
if ct == "file":
return False
_VOICE_EXTENSIONS = (