Fixng Jit.si url videoconference generation

stable
Alejandro Alonso 2015-05-25 14:46:26 +02:00
parent fdb9097edd
commit 82de0addc7
1 changed files with 6 additions and 3 deletions

View File

@ -249,22 +249,25 @@ ProjectMenuDirective = ($log, $compile, $auth, $rootscope, $tgAuth, $location, $
container.replaceWith(dom)
videoConferenceUrl = (project) ->
urlSeparator = "-"
urlFixer = (url) -> return url
if project.videoconferences == "appear-in"
baseUrl = "https://appear.in/"
else if project.videoconferences == "talky"
baseUrl = "https://talky.io/"
else if project.videoconferences == "jitsi"
urlSeparator = ""
baseUrl = "https://meet.jit.si/"
urlFixer = (url) -> return url.replace(/ /g, "").replace(/-/g, "")
else
return ""
if project.videoconferences_salt
url = "#{project.slug}#{urlSeparator}#{project.videoconferences_salt}"
url = "#{project.slug}-#{project.videoconferences_salt}"
else
url = "#{project.slug}"
url = urlFixer(url)
return baseUrl + url