mirror of
https://github.com/mikedilger/chorus.git
synced 2026-10-18 07:31:46 +00:00
cargo fmt
This commit is contained in:
parent
f06073278c
commit
42a0f0136b
@ -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)?;
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user