feat(jibri,jicofo,jigasi,jvb,prosody,web): trim empty list entries when splitting with splitList to allow trailing comma (#1932)

This commit is contained in:
Aaron van Meerten
2024-10-11 10:50:41 -05:00
committed by GitHub
parent c58a9e52e9
commit 4369907615
10 changed files with 44 additions and 44 deletions

View File

@@ -39,7 +39,7 @@ jibri {
}
{{ if .Env.JIBRI_WEBHOOK_SUBSCRIBERS -}}
webhook {
subscribers = [{{ range $index, $element := splitList "," .Env.JIBRI_WEBHOOK_SUBSCRIBERS }}{{ if gt $index 0}},{{ end }}"{{ $element }}"{{ end }}]
subscribers = [{{ range $index, $element := (splitList "," .Env.JIBRI_WEBHOOK_SUBSCRIBERS | compact) }}{{ if gt $index 0}},{{ end }}"{{ $element }}"{{ end }}]
}{{ end }}
ffmpeg {
resolution = "{{ $JIBRI_RECORDING_RESOLUTION }}"
@@ -62,7 +62,7 @@ jibri {
chrome {
// The flags which will be passed to chromium when launching
flags = [
"{{ join "\",\"" (splitList "," .Env.CHROMIUM_FLAGS) }}"
"{{ join "\",\"" (splitList "," .Env.CHROMIUM_FLAGS | compact) }}"
]
}
{{ else if $IGNORE_CERTIFICATE_ERRORS -}}

View File

@@ -12,7 +12,7 @@
{{ $XMPP_TRUST_ALL_CERTS := .Env.XMPP_TRUST_ALL_CERTS | default "true" | toBool -}}
{{ $XMPP_PORT := .Env.XMPP_PORT | default "5222" -}}
{{ $XMPP_SERVER := .Env.XMPP_SERVER | default "xmpp.meet.jitsi" -}}
{{ $XMPP_SERVERS := splitList "," $XMPP_SERVER -}}
{{ $XMPP_SERVERS := splitList "," $XMPP_SERVER | compact -}}
{{/* assign env from context, preserve during range when . is re-assigned */}}
{{ $ENV := .Env -}}