forked from MirrorHub/mautrix-whatsapp
Add support for slightly older voice message identifier
This commit is contained in:
parent
b66f37e373
commit
3eb5f44023
1 changed files with 3 additions and 1 deletions
|
@ -2152,7 +2152,9 @@ func (portal *Portal) convertMatrixMessage(sender *User, evt *event.Event) (*waP
|
|||
FileSha256: media.FileSHA256,
|
||||
FileLength: &media.FileLength,
|
||||
}
|
||||
if _, isVoice := evt.Content.Raw["org.matrix.msc3245.voice"]; isVoice {
|
||||
_, isMSC3245Voice := evt.Content.Raw["org.matrix.msc3245.voice"]
|
||||
_, isMSC2516Voice := evt.Content.Raw["org.matrix.msc2516.voice"]
|
||||
if isMSC3245Voice || isMSC2516Voice {
|
||||
info.Message.AudioMessage.Ptt = &trueVal
|
||||
// hacky hack to add the codecs param that whatsapp seems to require
|
||||
mimeWithCodec := addCodecToMime(content.GetInfo().MimeType, "opus")
|
||||
|
|
Loading…
Add table
Reference in a new issue