Skip to content

Clicking on unbookmarked rooms with automatic "letters" avatar duplicates it into room title #3529

@BetaRays

Description

@BetaRays

Describe the bug
When joining a room without an avatar, Converse.js will automatically make one based on the room’s title, for example, for a MUC named "broken@muc.localhost", it will use the letter “B”.
When clicking on this room, if it is not bookmarked, its display name will change to "B broken@muc.localhost", which makes the avatar change to "BB": clicking any more times will prepend "BB" to the room name and the avatar won’t change.
This may also happen when an unread message count is shown (e.g. if you are mentioned in a room you aren’t currently looking at), so the bug exists outside of the new room icon feature.

To Reproduce
Steps to reproduce the behavior:

  1. Join a MUC without an avatar, ensure it is not bookmarked.
  2. Click on the MUC’s entry in the sidebar (multiple times)
  3. Notice the name getting longer each time.

Expected behavior
MUC names shouldn’t automatically change, becoming unreadable when clicking on them.

Screenshots

example screenshot

Environment (please complete the following information):

  • Desktop or Mobile? Desktop
  • Browser [e.g. Chrome, Firefox] Firefox
  • Converse.js version [e.g. 4.2.0] v11.0.0, current master: 37dfc25

Additional context
I think the issue comes from this line, specifically, target.textContent seems to include the automatic avatar.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions