Skip to content

Commit

Permalink
msgconv/from-matrix: fix error if voice message is missing waveform
Browse files Browse the repository at this point in the history
  • Loading branch information
tulir committed Oct 7, 2024
1 parent 7488865 commit dcd0b56
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/msgconv/from-matrix.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand Down

0 comments on commit dcd0b56

Please sign in to comment.