From 6c2fb205ab55a0e6f591101b7bae42b54fad94c1 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Thu, 11 Jul 2024 08:28:22 +0200 Subject: [PATCH] Do not log::trace sensitive data --- src/services/telegram/commands/mod.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/services/telegram/commands/mod.rs b/src/services/telegram/commands/mod.rs index 1df6c70b..11e71d2b 100644 --- a/src/services/telegram/commands/mod.rs +++ b/src/services/telegram/commands/mod.rs @@ -42,11 +42,12 @@ impl Command { log::trace!("Determining bot commands..."); let commands = Self::bot_commands(); - log::trace!("Setting commands on {bot:?}: {commands:#?}"); - let reply = bot.set_my_commands(commands).await + // This always returns true, for whatever reason + log::trace!("Setting commands: {commands:#?}"); + let _ = bot.set_my_commands(commands).await .context("Impossibile aggiornare l'elenco comandi del bot.")?; - log::trace!("Setting commands on {bot:?} successful: {reply:#?}"); + log::trace!("Setting commands successful!"); Ok(()) } }