add feature for smElement client hacks

Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
strawberry 2024-03-23 23:13:40 -04:00 committed by June
parent 55813e90bf
commit f4146de17d
4 changed files with 59 additions and 50 deletions

View file

@ -189,18 +189,20 @@ pub async fn get_message_events_route(
.collect();
for (_, event) in &events_after {
/* TODO: Remove this when these are resolved:
/* TODO: Remove the not "element_hacks" check when these are resolved:
* https://github.com/vector-im/element-android/issues/3417
* https://github.com/vector-im/element-web/issues/21034
if !services().rooms.lazy_loading.lazy_load_was_sent_before(
sender_user,
sender_device,
&body.room_id,
&event.sender,
)? {
*/
if !cfg!(features = "element_hacks")
&& !services().rooms.lazy_loading.lazy_load_was_sent_before(
sender_user,
sender_device,
&body.room_id,
&event.sender,
)? {
lazy_loaded.insert(event.sender.clone());
}
*/
lazy_loaded.insert(event.sender.clone());
}
@ -231,18 +233,20 @@ pub async fn get_message_events_route(
.collect();
for (_, event) in &events_before {
/* TODO: Remove this when these are resolved:
/* TODO: Remove the not "element_hacks" check when these are resolved:
* https://github.com/vector-im/element-android/issues/3417
* https://github.com/vector-im/element-web/issues/21034
if !services().rooms.lazy_loading.lazy_load_was_sent_before(
sender_user,
sender_device,
&body.room_id,
&event.sender,
)? {
*/
if !cfg!(features = "element_hacks")
&& !services().rooms.lazy_loading.lazy_load_was_sent_before(
sender_user,
sender_device,
&body.room_id,
&event.sender,
)? {
lazy_loaded.insert(event.sender.clone());
}
*/
lazy_loaded.insert(event.sender.clone());
}