Skip to content

Commit

Permalink
Fix Matrix voice message check
Browse files Browse the repository at this point in the history
  • Loading branch information
tulir committed Mar 11, 2024
1 parent d9364a7 commit 7c9483b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions portal.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 7c9483b

Please sign in to comment.