From efe15feab0ab43c89fa6eacd9229c42dc25f3da5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kier=C3=A1n=20Meinhardt?= Date: Wed, 1 May 2019 15:44:04 +0200 Subject: [PATCH] Send the same message to recipients --- modules/telegram-bot.nix | 4 ++-- systems/catullus/containers.nix | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/telegram-bot.nix b/modules/telegram-bot.nix index d58e021..28f8e47 100644 --- a/modules/telegram-bot.nix +++ b/modules/telegram-bot.nix @@ -8,10 +8,10 @@ let startAt = bot.time; serviceConfig.Type = "oneshot"; wants = [ "network-online.target" ]; - script = strings.concatStringsSep "\n" (map (chatId: '' + script = strings.concatStringsSep "\n" (["QUOTE=$(${bot.command})"] ++ map (chatId: '' ${pkgs.curl}/bin/curl -s -X POST "https://api.telegram.org/bot${bot.token}/sendMessage" \ -d chat_id="${chatId}" \ - -d text="$(${bot.command})" ${ + -d text="$QUOTE" ${ if bot.parseMode == null then "" else "-d parse_mode=${bot.parseMode}" } diff --git a/systems/catullus/containers.nix b/systems/catullus/containers.nix index 9573404..f29791b 100644 --- a/systems/catullus/containers.nix +++ b/systems/catullus/containers.nix @@ -14,7 +14,7 @@ in { enable = true; time = "08/6:00"; token = lib.strings.removeSuffix "\n" (builtins.readFile ); - chatIds = [ "18980945" ]; + chatIds = [ "18980945" "757821027" ]; command = "${pkgs.literature-quote}/bin/literature-quote"; parseMode = "Markdown"; };