[Backport] Fixng Jit.si url videoconference generation

stable
Alejandro Alonso 2015-05-25 14:46:26 +02:00 committed by David Barragán Merino
parent 7636b5c2de
commit cb800fe4b0
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) container.replaceWith(dom)
videoConferenceUrl = (project) -> videoConferenceUrl = (project) ->
urlSeparator = "-" urlFixer = (url) -> return url
if project.videoconferences == "appear-in" if project.videoconferences == "appear-in"
baseUrl = "https://appear.in/" baseUrl = "https://appear.in/"
else if project.videoconferences == "talky" else if project.videoconferences == "talky"
baseUrl = "https://talky.io/" baseUrl = "https://talky.io/"
else if project.videoconferences == "jitsi" else if project.videoconferences == "jitsi"
urlSeparator = ""
baseUrl = "https://meet.jit.si/" baseUrl = "https://meet.jit.si/"
urlFixer = (url) -> return url.replace(/ /g, "").replace(/-/g, "")
else else
return "" return ""
if project.videoconferences_salt if project.videoconferences_salt
url = "#{project.slug}#{urlSeparator}#{project.videoconferences_salt}" url = "#{project.slug}-#{project.videoconferences_salt}"
else else
url = "#{project.slug}" url = "#{project.slug}"
url = urlFixer(url)
return baseUrl + url return baseUrl + url