Skip to content

Commit

Permalink
Define telegram_webhook URL only when required parameters are satisfied.
Browse files Browse the repository at this point in the history
  • Loading branch information
Edu4rdSHL committed Oct 30, 2019
1 parent 486a287 commit abd47dd
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/args.rs
Expand Up @@ -57,10 +57,7 @@ pub fn get_args() -> Args {
discord_webhook: get_vars::get_webhook("discord"),
slack_webhook: get_vars::get_webhook("slack"),
telegram_bot_token: get_vars::get_auth_token("telegram"),
telegram_webhook: format!(
"https://api.telegram.org/bot{}/sendMessage",
get_vars::get_auth_token("telegram")
),
telegram_webhook: String::new(),
telegram_chat_id: get_vars::get_chat_id("telegram"),

only_resolved: matches.is_present("resolved"),
Expand Down

0 comments on commit abd47dd

Please sign in to comment.