cargo fmt

This commit is contained in:
Mike Dilger 2024-10-25 10:21:26 +13:00
parent f06073278c
commit 42a0f0136b
2 changed files with 7 additions and 6 deletions

View File

@ -20,13 +20,13 @@ fn main() -> Result<(), Error> {
// These kinds don't need approval:
let allowed_kinds = vec![
Kind::from(4), // Encrypted Direct Message
Kind::from(1059), // Giftwrap
Kind::from(4), // Encrypted Direct Message
Kind::from(1059), // Giftwrap
Kind::from(10002), // Relay list
Kind::from(10050), // DM Relay list
Kind::from(0), // Metadata
Kind::from(3), // Following list
Kind::from(7), // Reaction
Kind::from(0), // Metadata
Kind::from(3), // Following list
Kind::from(7), // Reaction
];
let store = chorus::setup_store(&config)?;

View File

@ -318,7 +318,8 @@ async fn websocket_thread(peer: HashedPeer, websocket: HyperWebsocket, origin: S
let ban_seconds = if GLOBALS.config.read().enable_ip_blocking {
let mut ban_seconds = 0;
if let Ok(mut ip_data) = get_ip_data(GLOBALS.store.get().unwrap(), peer.ip()) {
ban_seconds = ip_data.update_on_session_close(session_exit, minimum_ban_seconds);
ban_seconds =
ip_data.update_on_session_close(session_exit, minimum_ban_seconds);
let _ = update_ip_data(GLOBALS.store.get().unwrap(), peer.ip(), &ip_data);
}
ban_seconds