We were discussing this issue earlier with @Velin92 when we realised someone changing their avatar in a room didn't trigger any changes in the timeline but someone changing their display name made the sender info in all timeline items update, including other pending changes like the avatar change tested before.
This seems to happen because of this code:
|
RoomEventCacheUpdate::UpdateMembers { ambiguity_changes } => { |
|
if !ambiguity_changes.is_empty() { |
|
let member_ambiguity_changes = ambiguity_changes |
|
.values() |
|
.flat_map(|change| change.user_ids()) |
|
.collect::<BTreeSet<_>>(); |
|
timeline_controller |
|
.force_update_sender_profiles(&member_ambiguity_changes) |
|
.await; |
|
} |
The display name change is treated as an ambiguity change and forces the update of timeline sender info in those events where the collected user ids are the senders.
This seems like a better alternative than the changes done in element-hq/element-x-android#6775 and element-hq/element-x-ios#5584.
We were discussing this issue earlier with @Velin92 when we realised someone changing their avatar in a room didn't trigger any changes in the timeline but someone changing their display name made the sender info in all timeline items update, including other pending changes like the avatar change tested before.
This seems to happen because of this code:
matrix-rust-sdk/crates/matrix-sdk-ui/src/timeline/tasks.rs
Lines 276 to 285 in 21e8138
The display name change is treated as an ambiguity change and forces the update of timeline sender info in those events where the collected user ids are the senders.
This seems like a better alternative than the changes done in element-hq/element-x-android#6775 and element-hq/element-x-ios#5584.