Skip to content

Commit

Permalink
Do not log the command if the message is sent by the bot user
Browse files Browse the repository at this point in the history
Because those are never commands
  • Loading branch information
exul committed Feb 4, 2017
1 parent fa89287 commit bafef8d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/matrix-rocketchat/handlers/events/command_handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ impl<'a> CommandHandler<'a> {
debug!(self.logger, "Received help command");

self.help(event)?;
} else if event.user_id == self.config.matrix_bot_user_id()? {
debug!(self.logger, "Skipping event from bot user");
} else {
let msg = format!("Skipping event, don't know how to handle command `{}`", message);
debug!(self.logger, msg);
Expand Down

0 comments on commit bafef8d

Please sign in to comment.