summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/Properties.hs30
1 files changed, 26 insertions, 4 deletions
diff --git a/lib/Properties.hs b/lib/Properties.hs
index 85ef7c0..35cc155 100644
--- a/lib/Properties.hs
+++ b/lib/Properties.hs
@@ -153,7 +153,7 @@ checkLayerProperty p@(Property name _value) = case name of
>>= setProperty "jitsiRoomAdminTag"
uselessEmptyLayer
unwrapString' p
- $ suggestProperty $ Property "jitsiTrigger" (StrProp "onaction")
+ $ suggestProperty $ Property "jitsiTrigger" "onaction"
"jitsiTrigger" -> do
isString p
unlessHasProperty "jitsiTriggerMessage"
@@ -169,6 +169,30 @@ checkLayerProperty p@(Property name _value) = case name of
"jitsiInterfaceConfig" -> isForbidden
"jitsiWidth" ->
isIntInRange 0 100 p
+ "bbbRoom" -> do
+ removeProperty "bbbRoom"
+ unwrapURI (Proxy @"bbb") p
+ (\link -> do
+ dependsOn (Link link)
+ setProperty "openWebsite" link
+ setProperty "openWebsitePolicy"
+ ("fullscreen;camera;microphone;display-capture" :: Text)
+ )
+ (const $ complain "property \"bbbRoom\" cannot be used with local links.")
+ "bbbTrigger" -> do
+ removeProperty "bbbTrigger"
+ requireProperty "bbbRoom"
+ unwrapString p
+ (setProperty "openWebsiteTrigger")
+ unlessHasProperty "bbbTriggerMessage" $ do
+ suggest "set \"bbbTriggerMessage\" to a custom message to overwrite the default \"press SPACE to enter the bbb room\""
+ setProperty "openWebsiteTriggerMessage"
+ ("press SPACE to enter bbb room" :: Text)
+ "bbbTriggerMessage" -> do
+ removeProperty "bbbTriggerMessage"
+ requireProperty "bbbRoom"
+ unwrapString p
+ (setProperty "openWebsiteTriggerMessage")
"playAudio" -> do
uselessEmptyLayer
unwrapLink p $ \link -> if "https://" `isPrefixOf` link
@@ -196,9 +220,7 @@ checkLayerProperty p@(Property name _value) = case name of
"openWebsiteTriggerMessage" -> do
isString p
requireProperty "openWebsiteTrigger"
- "openWebsitePolicy" -> do
- isString p
- requireProperty "openWebsite"
+ "openWebsitePolicy" -> isForbidden
"openWebsiteAllowApi" -> isForbidden
"openTab" -> do
isString p