forked from MirrorHub/mautrix-whatsapp
Send all ogg audio from WhatsApp as voice messages
For some reason WhatsApp removes the `ptt` flag when a message is forwarded, but still renders them as voice messages.
This commit is contained in:
parent
de5de426cb
commit
c00fa4dd24
1 changed files with 1 additions and 1 deletions
|
@ -3014,7 +3014,7 @@ func (portal *Portal) convertMediaMessageContent(intent *appservice.IntentAPI, m
|
||||||
"duration": int(audioMessage.GetSeconds()) * 1000,
|
"duration": int(audioMessage.GetSeconds()) * 1000,
|
||||||
"waveform": waveform,
|
"waveform": waveform,
|
||||||
}
|
}
|
||||||
if audioMessage.GetPtt() {
|
if audioMessage.GetPtt() || audioMessage.GetMimetype() == "audio/ogg; codecs/opus" {
|
||||||
extraContent["org.matrix.msc3245.voice"] = map[string]interface{}{}
|
extraContent["org.matrix.msc3245.voice"] = map[string]interface{}{}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue