diff options
author | stuebinm | 2022-04-06 18:05:42 +0200 |
---|---|---|
committer | stuebinm | 2022-04-06 18:05:42 +0200 |
commit | 92945f9e855284534e103e4f29e069101033a62c (patch) | |
tree | c69ce5727cdd90629617382eec3aec995cd82bfb /lib/LintWriter.hs | |
parent | d3dcb5f4a787657f15799744c74f9a84baf1057b (diff) |
linter: collect jitsi rooms of maps
Diffstat (limited to '')
-rw-r--r-- | lib/LintWriter.hs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/LintWriter.hs b/lib/LintWriter.hs index 87bad02..afcec65 100644 --- a/lib/LintWriter.hs +++ b/lib/LintWriter.hs @@ -40,7 +40,7 @@ module LintWriter , lintConfig -- * adjust the linter's context , adjust - ,offersCWs,resultToCWs) where + ,offersCWs,resultToCWs,offersJitsi,resultToJitsis) where import Universum @@ -126,6 +126,9 @@ resultToCWs :: LintResult a -> [Text] resultToCWs (LinterState a) = fold $ mapMaybe lintToCW $ fst a where lintToCW = \case (CW cw) -> Just cw; _ -> Nothing +resultToJitsis :: LintResult a -> [Text] +resultToJitsis (LinterState a) = mapMaybe lintToJitsi $ fst a + where lintToJitsi = \case (Jitsi room) -> Just room; _ -> Nothing -- | convert a lint result into a flat list of lints resultToLints :: LintResult a -> [Lint] @@ -160,6 +163,9 @@ offersBadge badge = tell' $ Badge badge offersCWs :: [Text] -> LintWriter a offersCWs = tell' . CW +offersJitsi :: Text -> LintWriter a +offersJitsi = tell' . Jitsi + -- | get the context as it was initially, without any modifications askContext :: LintWriter' a a |