Skip to content

Commit

Permalink
Fix uploading voice messages to fb
Browse files Browse the repository at this point in the history
  • Loading branch information
tulir committed Feb 9, 2024
1 parent 7891166 commit e6138b3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions upload.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,10 @@ func (cli *Client) rawUpload(ctx context.Context, dataToUpload, fileHash []byte,
uploadPrefix := "mms"
if cli.MessengerConfig != nil {
uploadPrefix = "wa-msgr/mms"
// Messenger upload only allows voice messages, not audio files
if mmsType == "audio" {
mmsType = "ptt"
}
}
if newsletter {
mmsType = fmt.Sprintf("newsletter-%s", mmsType)
Expand Down

0 comments on commit e6138b3

Please sign in to comment.