fix: flip audio default to file (backward compat)
- Default: sendAudio (file with metadata) - preserves old behavior - Opt-in: [[audio_as_voice]] tag for voice bubble This is non-breaking - existing integrations keep working.
This commit is contained in:
committed by
Peter Steinberger
parent
262f8a8d45
commit
2972fce02c
@@ -1250,12 +1250,14 @@ async function deliverReplies(params: {
|
||||
...mediaParams,
|
||||
});
|
||||
} else if (kind === "audio") {
|
||||
const useVoice = reply.audioAsVoice === true; // default false
|
||||
const useVoice = reply.audioAsVoice === true; // default false (backward compatible)
|
||||
if (useVoice) {
|
||||
// Voice message - displays as round playable bubble (opt-in via [[audio_as_voice]])
|
||||
await bot.api.sendVoice(chatId, file, {
|
||||
...mediaParams,
|
||||
});
|
||||
} else {
|
||||
// Audio file - displays with metadata (title, duration) - DEFAULT
|
||||
await bot.api.sendAudio(chatId, file, {
|
||||
...mediaParams,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user