From a2ee6b410e03190b3e330b7dfc1c2d246f0cd339 Mon Sep 17 00:00:00 2001 From: strawberry Date: Wed, 3 Apr 2024 16:36:51 -0400 Subject: [PATCH] add another element_hacks feature check Signed-off-by: strawberry --- src/api/client_server/message.rs | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/src/api/client_server/message.rs b/src/api/client_server/message.rs index 34bb74fc..a2399ac7 100644 --- a/src/api/client_server/message.rs +++ b/src/api/client_server/message.rs @@ -261,18 +261,16 @@ pub async fn get_message_events_route( } } - // TODO: enable again when we are sure clients can handle it - /* - if let Some(next_token) = next_token { - services().rooms.lazy_loading.lazy_load_mark_sent( - sender_user, - sender_device, - &body.room_id, - lazy_loaded, - next_token, - ).await; + // remove the feature check when we are sure clients like element can handle it + if !cfg!(feature = "element_hacks") { + if let Some(next_token) = next_token { + services() + .rooms + .lazy_loading + .lazy_load_mark_sent(sender_user, sender_device, &body.room_id, lazy_loaded, next_token) + .await; + } } - */ Ok(resp) }