mirror of
https://github.com/hicccc77/WeFlow.git
synced 2026-03-24 23:06:51 +00:00
fix
This commit is contained in:
@@ -587,8 +587,12 @@ class ExportService {
|
||||
case 3: return '[图片]'
|
||||
case 34: {
|
||||
// 语音消息 - 尝试获取转写文字
|
||||
if (sessionId && createTime) {
|
||||
const transcript = voiceTranscribeService.getCachedTranscript(sessionId, createTime)
|
||||
const transcriptGetter = (voiceTranscribeService as unknown as {
|
||||
getCachedTranscript?: (sessionId: string, createTime: number) => string | null | undefined
|
||||
}).getCachedTranscript
|
||||
|
||||
if (sessionId && createTime && typeof transcriptGetter === 'function') {
|
||||
const transcript = transcriptGetter(sessionId, createTime)
|
||||
if (transcript) {
|
||||
return `[语音消息] ${transcript}`
|
||||
}
|
||||
@@ -3752,7 +3756,7 @@ class ExportService {
|
||||
})
|
||||
}
|
||||
|
||||
const useVoiceTranscript = options.exportVoiceAsText !== false
|
||||
const useVoiceTranscript = options.exportVoiceAsText === true
|
||||
const voiceMessages = useVoiceTranscript
|
||||
? sortedMessages.filter(msg => msg.localType === 34)
|
||||
: []
|
||||
|
||||
Reference in New Issue
Block a user