diff --git a/src/api/client/context.rs b/src/api/client/context.rs index 89a08153e..f223d4889 100644 --- a/src/api/client/context.rs +++ b/src/api/client/context.rs @@ -21,11 +21,13 @@ pub(crate) async fn get_context_route( let sender_user = body.sender_user.as_ref().expect("user is authenticated"); let sender_device = body.sender_device.as_ref().expect("user is authenticated"); + // some clients, at least element, seem to require knowledge of redundant + // members for "inline" profiles on the timeline to work properly let (lazy_load_enabled, lazy_load_send_redundant) = match &body.filter.lazy_load_options { LazyLoadOptions::Enabled { include_redundant_members, } => (true, *include_redundant_members), - LazyLoadOptions::Disabled => (false, false), + LazyLoadOptions::Disabled => (false, cfg!(feature = "element_hacks")), }; let mut lazy_loaded = HashSet::new(); diff --git a/src/api/client/sync.rs b/src/api/client/sync.rs index 34baf7c1c..b25348d40 100644 --- a/src/api/client/sync.rs +++ b/src/api/client/sync.rs @@ -106,11 +106,13 @@ pub(crate) async fn sync_events_route( .unwrap_or_default(), }; + // some clients, at least element, seem to require knowledge of redundant + // members for "inline" profiles on the timeline to work properly let (lazy_load_enabled, lazy_load_send_redundant) = match filter.room.state.lazy_load_options { LazyLoadOptions::Enabled { - include_redundant_members: redundant, - } => (true, redundant), - LazyLoadOptions::Disabled => (false, false), + include_redundant_members, + } => (true, include_redundant_members), + LazyLoadOptions::Disabled => (false, cfg!(feature = "element_hacks")), }; let full_state = body.full_state;