msgconv/from-matrix: fix error if voice message is missing waveform

This commit is contained in:
Tulir Asokan 2024-10-07 19:50:04 +03:00
parent 7488865b51
commit dcd0b568bc

View file

@ -508,7 +508,7 @@ func getAudioInfo(content *event.MessageEventContent) (output []byte, Duration u
return nil, uint32(content.Info.Duration / 1000)
}
waveform := audioInfo.Waveform
if waveform != nil {
if len(waveform) == 0 {
return nil, uint32(audioInfo.Duration / 1000)
}