Fix Matrix voice message check
This commit is contained in:
parent
d9364a7b7f
commit
7c9483bc2b
2 changed files with 3 additions and 2 deletions
|
@ -7,6 +7,7 @@
|
|||
be online. Google Fi cloud sync is still not supported.
|
||||
* Added deduplication for DM participants, as Google randomly sends duplicate
|
||||
participant entries sometimes.
|
||||
* Added voice message conversion.
|
||||
* Changed custom image reactions to be bridged as `:custom:` instead of a UUID.
|
||||
Google Messages for Web doesn't support fetching the actual image yet.
|
||||
* Fixed sending reactions breaking for some users.
|
||||
|
|
|
@ -1985,8 +1985,8 @@ func (portal *Portal) reuploadMedia(ctx context.Context, sender *User, content *
|
|||
if content.FileName != "" {
|
||||
fileName = content.FileName
|
||||
}
|
||||
isVoice, ok := raw["org.matrix.msc3245.voice"].(bool)
|
||||
if ok && isVoice {
|
||||
_, isVoice := raw["org.matrix.msc3245.voice"]
|
||||
if isVoice {
|
||||
data, err = ffmpeg.ConvertBytes(ctx, data, ".m4a", []string{}, []string{"-c:a", "aac"}, content.Info.MimeType)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("%w (ogg to m4a): %w", errMediaConvertFailed, err)
|
||||
|
|
Loading…
Reference in a new issue