forked from MirrorHub/mautrix-whatsapp
Send audio messages with captions as document messages
This commit is contained in:
parent
e3174a7bd7
commit
b65ec753cf
1 changed files with 4 additions and 0 deletions
|
@ -3846,6 +3846,10 @@ func (portal *Portal) convertMatrixMessage(ctx context.Context, sender *User, ev
|
|||
if content.MsgType == event.MsgImage && content.GetInfo().MimeType == "image/gif" {
|
||||
content.MsgType = event.MsgVideo
|
||||
}
|
||||
if content.MsgType == event.MsgAudio && content.FileName != "" && content.Body != content.FileName {
|
||||
// Send audio messages with captions as files since WhatsApp doesn't support captions on audio messages
|
||||
content.MsgType = event.MsgFile
|
||||
}
|
||||
|
||||
switch content.MsgType {
|
||||
case event.MsgText, event.MsgEmote, event.MsgNotice:
|
||||
|
|
Loading…
Reference in a new issue