diff --git a/src/context.rs b/src/context.rs index cfff41632..d149c7446 100644 --- a/src/context.rs +++ b/src/context.rs @@ -453,7 +453,7 @@ impl Context { translated_stockstrings: stockstrings, events, scheduler: SchedulerState::new(), - ratelimit: RwLock::new(Ratelimit::new(Duration::new(60, 0), 6.0)), // Allow at least 1 message every 10 seconds + a burst of 6. + ratelimit: RwLock::new(Ratelimit::new(Duration::new(3, 0), 3.0)), // Allow at least 1 message every second + a burst of 3. quota: RwLock::new(None), new_msgs_notify, server_id: RwLock::new(None), @@ -485,12 +485,6 @@ impl Context { return; } - if self.is_chatmail().await.unwrap_or_default() { - let mut lock = self.ratelimit.write().await; - // Allow at least 1 message every second + a burst of 3. - *lock = Ratelimit::new(Duration::new(3, 0), 3.0); - } - // The next line is mainly for iOS: // iOS starts a separate process for receiving notifications and if the user concurrently // starts the app, the UI process opens the database but waits with calling start_io() diff --git a/src/webxdc/webxdc_tests.rs b/src/webxdc/webxdc_tests.rs index cc205f3fc..3a03d606f 100644 --- a/src/webxdc/webxdc_tests.rs +++ b/src/webxdc/webxdc_tests.rs @@ -1289,7 +1289,7 @@ async fn test_get_webxdc_info() -> Result<()> { let info = instance.get_webxdc_info(&t).await?; assert_eq!(info.name, "minimal.xdc"); assert_eq!(info.icon, WEBXDC_DEFAULT_ICON.to_string()); - assert_eq!(info.send_update_interval, 10000); + assert_eq!(info.send_update_interval, 1000); assert_eq!(info.send_update_max_size, RECOMMENDED_FILE_SIZE as usize); let mut instance = create_webxdc_instance(