forked from 2600hz/kazoo
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PISTON-1170: Sets content_type for prepend_on_forward correctly.
The kzm_message:forward_message/4 function branches, depending on whether the user has recorded an additional message to be prepended to the voicemail message being forwarded. Prepending the additional message requires the two media files to be merged into a temporary file. This is then written to the database as an attachment. Prior to this fix, the code assumed that the merged media file has an mp3 format, which is not necessarily true. In addition, it did not pass any content-type option to the kz_datamgr:put_attachment/5 function which actually writes the attachment. As a result, the attachment metadata in the database always indicated a content-type of application/octet-stream. Calls to kz_media_util:join_media_files/2 now ensure that the merged output format is specified explicitly, rather than relying on default behaviour. The same format is also mapped to the corresponding MIME type which is passed to kz_datamgr:put_attachment/5 to ensure the attachment metadata is correct. Upstream pull requests: 4.3: 2600hz#6674 5: https://github.com/2600hz/kazoo-core/pull/170
- Loading branch information
Roger Neate
committed
Dec 15, 2020
1 parent
84b6a7d
commit 68658be
Showing
3 changed files
with
14 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters