Skip to content

Room member display name changes update the timeline sender, but avatar updates don't #6575

@jmartinesp

Description

@jmartinesp

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions