From 7033597e239d37fd14890c96ae5f07b94a15953d Mon Sep 17 00:00:00 2001 From: stuebinm Date: Tue, 30 Nov 2021 00:27:35 +0100 Subject: prepend jitsi room names with assembly tag (to prevent name clashes between assemblies; shared jitsi rooms are still possible simply by letting their names start with "shared-") --- lib/Properties.hs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/Properties.hs b/lib/Properties.hs index 262f427..7772c26 100644 --- a/lib/Properties.hs +++ b/lib/Properties.hs @@ -154,8 +154,13 @@ checkLayerProperty p@(Property name _value) = case name of >>= setProperty "jitsiRoomAdminTag" . ("assembly-" <>) -- prepend "assembly-" to avoid namespace clashes uselessEmptyLayer - unwrapString' p - $ suggestProperty $ Property "jitsiTrigger" "onaction" + unwrapString p $ \jitsiRoom -> do + suggestProperty $ Property "jitsiTrigger" "onaction" + + -- prepend jitsi room names to avoid name clashes + unless ("shared-" `isPrefixOf` jitsiRoom) $ do + assemblyname <- lintConfig configAssemblyTag + setProperty "jitsiRoom" (assemblyname <> "-" <> jitsiRoom) "jitsiTrigger" -> do isString p unlessHasProperty "jitsiTriggerMessage" -- cgit v1.2.3