From 2c4603c01a36b4ed54ada906879f1c02956cd4c2 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Mon, 12 Dec 2016 10:50:38 +0100 Subject: List all subscribers --- ymir/mlmmj-expose.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ymir/mlmmj-expose.nix b/ymir/mlmmj-expose.nix index 0873b0f7..122fafa4 100644 --- a/ymir/mlmmj-expose.nix +++ b/ymir/mlmmj-expose.nix @@ -69,6 +69,11 @@ let "mlmmj-get-exposed" -> do args <- getArgs case args of + [(dropTrailingPathSeperator -> listDir), (map toLower -> ident)] -> do + setCurrentDirectory listDir + identities <- getIdentities + unless (ident `elem` identities) . die $ "Unknown sender: ‘" ++ ident ++ "’" + mapM_ (\sub -> putStrLn $ sub ++ " " ++ takeFileName listDir ++ "+" ++ hash' (ident, sub) ++ "@subs.lists.yggdrasil.li") =<< getSubscribers (dropTrailingPathSeparator -> listDir) : (map toLower -> ident) : (map (map toLower) -> recipients) -> do setCurrentDirectory listDir identities <- getIdentities -- cgit v1.2.3