mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-03 05:20:23 +00:00
refactor(media): centralize voice compatibility policy
This commit is contained in:
@@ -1,11 +1,4 @@
|
||||
import { isVoiceCompatibleAudio } from "../media/audio.js";
|
||||
|
||||
export function isTelegramVoiceCompatible(opts: {
|
||||
contentType?: string | null;
|
||||
fileName?: string | null;
|
||||
}): boolean {
|
||||
return isVoiceCompatibleAudio(opts);
|
||||
}
|
||||
import { isTelegramVoiceCompatibleAudio } from "../media/audio.js";
|
||||
|
||||
export function resolveTelegramVoiceDecision(opts: {
|
||||
wantsVoice: boolean;
|
||||
@@ -15,7 +8,7 @@ export function resolveTelegramVoiceDecision(opts: {
|
||||
if (!opts.wantsVoice) {
|
||||
return { useVoice: false };
|
||||
}
|
||||
if (isTelegramVoiceCompatible(opts)) {
|
||||
if (isTelegramVoiceCompatibleAudio(opts)) {
|
||||
return { useVoice: true };
|
||||
}
|
||||
const contentType = opts.contentType ?? "unknown";
|
||||
|
||||
Reference in New Issue
Block a user