Skip to content
Snippets Groups Projects
Unverified Commit 31d18019 authored by Timo Kösters's avatar Timo Kösters
Browse files

fix: workaround for missing avatars on element and rooms becoming historical

parent fb6bfa97
No related branches found
No related tags found
No related merge requests found
......@@ -170,6 +170,9 @@ pub async fn get_message_events_route(
.collect();
for (_, event) in &events_after {
/* TODO: Remove this 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,
......@@ -178,6 +181,8 @@ pub async fn get_message_events_route(
)? {
lazy_loaded.insert(event.sender.clone());
}
*/
lazy_loaded.insert(event.sender.clone());
}
next_token = events_after.last().map(|(count, _)| count).copied();
......@@ -210,6 +215,9 @@ pub async fn get_message_events_route(
.collect();
for (_, event) in &events_before {
/* TODO: Remove this 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,
......@@ -218,6 +226,8 @@ pub async fn get_message_events_route(
)? {
lazy_loaded.insert(event.sender.clone());
}
*/
lazy_loaded.insert(event.sender.clone());
}
next_token = events_before.last().map(|(count, _)| count).copied();
......@@ -244,6 +254,8 @@ 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,
......@@ -253,6 +265,7 @@ pub async fn get_message_events_route(
next_token,
);
}
*/
Ok(resp)
}
......@@ -433,6 +433,8 @@ async fn sync_helper(
} else if !lazy_load_enabled
|| body.full_state
|| timeline_users.contains(&state_key)
// TODO: Delete the following line when this is resolved: https://github.com/vector-im/element-web/issues/22565
|| *sender_user == state_key
{
let pdu = match services().rooms.timeline.get_pdu(&id)? {
Some(pdu) => pdu,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment