Allow voice recording when media types whitelist is empty;

pull/2088/head^2
Marcelo Schmidt 9 years ago
parent 22def793c9
commit a05c2b51d7
  1. 2
      i18n/en.i18n.json
  2. 2
      packages/rocketchat-ui-message/message/messageBox.coffee
  3. 2
      packages/rocketchat-ui/views/app/room.coffee

@ -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: ->

Loading…
Cancel
Save