Skip to content

Commit

Permalink
style: fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
arcuru committed Apr 15, 2024
1 parent 91856c0 commit d788100
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ use std::time::Duration;
use tokio::fs;
use tokio::sync::Mutex;
use tokio::time::sleep;
use tracing::{warn, error, info};
use tracing::{error, info, warn};

// The structure of the matrix rust sdk requires that any state that you need access to in the callbacks
// is 'static.
Expand Down Expand Up @@ -447,12 +447,12 @@ fn is_allowed(allow_list: Option<String>, sender: &str, username: &str) -> bool
// Check to see if it's from ourselves, in which case we should ignore it
if sender == username {
false
}
else if let Some(allow_list) = allow_list {
} else if let Some(allow_list) = allow_list {
let regex = Regex::new(&allow_list).expect("Invalid regular expression");
regex.is_match(sender)
} else {
false}
false
}
}

/// Check if the message is a command
Expand Down

0 comments on commit d788100

Please sign in to comment.