diff --git a/src/main.rs b/src/main.rs index 8a9bbf2..004d937 100644 --- a/src/main.rs +++ b/src/main.rs @@ -37,17 +37,10 @@ async fn on_stripped_state_member(room_member: StrippedRoomMemberEvent, client: if let Room::Invited(room) = room { tokio::spawn(async move { - let mut delay = 2; - - while let Err(err) = room.accept_invitation().await { - eprintln!("Warn: {} ({err:?}), retrying in {delay}s", room.room_id()); - - sleep(Duration::from_secs(delay)).await; - delay *= 2; - - if delay > 3600 { - eprintln!("Warn: {} ({err:?})", room.room_id()); - break; + if let Err(err) = room.accept_invitation().await { + eprintln!("Err: {err:?}"); + if let Err(e) = room.reject_invitation().await { + eprintln!("Err: {e:?}"); } } });