nheko icon indicating copy to clipboard operation
nheko copied to clipboard

Possible race condition leads to weird formatting of join/part messages

Open geekosaur opened this issue 1 year ago • 0 comments

Describe the bug

In a room with a puppeted heisenbridge, join and part messages are relayed from the linked IRC channel. Sometimes, when the user immediately rejoins, the join or part message gets formatted to the width of the corresponding part/join message, but because heisenbridge removed its display name, its (synthetic and fairly long) MXID is formatted instead. This doesn't happen consistently, which makes me think there's a race condition where it sizes the part message with the display name but that is gone by the time it displays it.

To Reproduce

  1. Join a room with a puppeted heisenbridge, such as #hackage:matrix.org
  2. Wait for a user to part and rejoin IRC.

What happened?

The message (not very consistently) is formatted to the width it would have been with the display name, but is output with the MXID.

Expected behavior

The display name should have been cached when the width was computed, and used for the actual output.

Screenshots

nheko-race-condition

Version

0.12.0-24c687d

Operating system

Linux

Installation method

Flatpak nightly repo or download

Qt version

No response

C++ compiler

No response

Desktop Environment

MATE with xmonad as window manager

Did you use profiles?

  • [ ] Profiles used?

Relevant log output

No response

Backtrace

No response

geekosaur avatar Jun 29 '24 02:06 geekosaur