Bug 498649 - Users which have joined and left a room while NeoChat was offline are displayed without name
Summary: Users which have joined and left a room while NeoChat was offline are display...
Status: RESOLVED FIXED
Alias: None
Product: NeoChat
Classification: Applications
Component: General (show other bugs)
Version: git master
Platform: Android Android 13.x
: NOR normal
Target Milestone: ---
Assignee: Tobias Fella
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-01-14 12:44 UTC by Ingo Klöcker
Modified: 2025-01-14 21:24 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ingo Klöcker 2025-01-14 12:44:16 UTC
Users which have joined and left a room while NeoChat was offline are displayed without name.

STEPS TO REPRODUCE
I saw this in #kate:kde.org. Look for the conversation between Akseli and doctor (where the latter is the user without name) on 2025-01-13. doctor joined the room (via IRC) at 19:20 UTC and left the room at 21:05 UTC. The messages have the sender "@_irc_doctor:im.kde.org".

OBSERVED RESULT
In NeoChat Android nightly (from master) the doctor user is displayed without name and if one touches the avatar NeoChat shows an error: invalid or empty matrix ID (translated from German). In Neochat 24.12.0 the doctor is displayed with name.

EXPECTED RESULT
The sender's name is displayed.

SOFTWARE/OS VERSIONS
Android: 13.0
KDE Frameworks Version: 6.9.0
Qt Version: 6.8.0
Comment 1 Ingo Klöcker 2025-01-14 12:45:27 UTC
nvrwhere wrote: "Maybe there's some issue with the new mechanism for storing member objects"
Comment 2 Bug Janitor Service 2025-01-14 18:26:04 UTC
A possibly relevant merge request was started @ https://invent.kde.org/network/neochat/-/merge_requests/2115
Comment 3 James Graham 2025-01-14 18:54:38 UTC
Git commit 856a751fcb222050455dde07634e07c0ecaf75ff by James Graham.
Committed on 14/01/2025 at 18:54.
Pushed by nvrwhere into branch 'master'.

Fix Getting Member Objects

It seems that there are no guarantees that we will have a room member event available when a message has arrived especially early on after room load so we should create member object unconditionally and make it the responsibility of the caller to only ask for real senders.

M  +0    -4    src/neochatroom.cpp
M  +9    -0    src/neochatroom.h

https://invent.kde.org/network/neochat/-/commit/856a751fcb222050455dde07634e07c0ecaf75ff
Comment 4 Ingo Klöcker 2025-01-14 21:24:26 UTC
I confirm that the user name (or at least their Matrix ID) is now displayed.