Skip to content
Snippets Groups Projects
Commit a05c2b51 authored by Marcelo Schmidt's avatar Marcelo Schmidt
Browse files

Allow voice recording when media types whitelist is empty;

parent 22def793
No related branches found
No related tags found
No related merge requests found
......@@ -182,7 +182,7 @@
"FileUpload_MaxFileSize" : "Maximum File Upload Size (in bytes)",
"FileUpload_MediaType_NotAccepted" : "Media Types Not Accepted",
"FileUpload_MediaTypeWhiteList" : "Accepted Media Types",
"FileUpload_MediaTypeWhiteListDescription" : "Comma-separated list of media types",
"FileUpload_MediaTypeWhiteListDescription" : "Comma-separated list of media types. Leave it blank for accepting all media types.",
"FileUpload_ProtectFiles" : "Protect uploaded files",
"FileUpload_ProtectFilesDescription" : "Only authenticated users will have access",
"Follow_social_profiles" : "Follow our social profiles, fork us on github and share your thoughts about the rocket.chat app on our trello board.",
......
......@@ -26,7 +26,7 @@ Template.messageBox.helpers
}
canRecordAudio: ->
wavRegex = /audio\/wav|audio\/\*/i
wavEnabled = RocketChat.settings.get("FileUpload_MediaTypeWhiteList").match(wavRegex)
wavEnabled = !RocketChat.settings.get("FileUpload_MediaTypeWhiteList") || RocketChat.settings.get("FileUpload_MediaTypeWhiteList").match(wavRegex)
return RocketChat.settings.get('Message_AudioRecorderEnabled') and (navigator.getUserMedia? or navigator.webkitGetUserMedia?) and wavEnabled and RocketChat.settings.get('FileUpload_Enabled')
usersTyping: ->
users = MsgTyping.get @_id
......
......@@ -167,7 +167,7 @@ Template.room.helpers
canRecordAudio: ->
wavRegex = /audio\/wav|audio\/\*/i
wavEnabled = RocketChat.settings.get("FileUpload_MediaTypeWhiteList").match(wavRegex)
wavEnabled = !RocketChat.settings.get("FileUpload_MediaTypeWhiteList") || RocketChat.settings.get("FileUpload_MediaTypeWhiteList").match(wavRegex)
return RocketChat.settings.get('Message_AudioRecorderEnabled') and (navigator.getUserMedia? or navigator.webkitGetUserMedia?) and wavEnabled and RocketChat.settings.get('FileUpload_Enabled')
unreadSince: ->
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment