diff --git a/portal.go b/portal.go index 4da13aa..03958aa 100644 --- a/portal.go +++ b/portal.go @@ -1990,7 +1990,10 @@ func (portal *Portal) convertMediaMessageContent(intent *appservice.IntentAPI, m max = waveform[i] } } - multiplier := 1024 / max + multiplier := 0 + if max > 0 { + multiplier = 1024 / max + } if multiplier > 32 { multiplier = 32 }