Bug 456638 - NeoChat should pass username to kirigami NameUtils::initialsFromString
Summary: NeoChat should pass username to kirigami NameUtils::initialsFromString
Status: RESOLVED FIXED
Alias: None
Product: NeoChat
Classification: Applications
Component: General (other bugs)
Version First Reported In: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Tobias Fella
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-07-12 16:25 UTC by Jan Bidler
Modified: 2022-10-23 15:45 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Bidler 2022-07-12 16:25:36 UTC
SUMMARY
Currently, NC passes `<username> <(MXID)>` (without <>) to that function, which generates initials wrong for a lot of bridges (i.e., `m(` for `me (@me:libera.chat)` instead of `m`).
NC should only pass in the username instead.

1. Open NeoChat
2. Open a room that's bridged with IRC

OBSERVED RESULT
See a lot of default avatars with ( as the last initial

EXPECTED RESULT
See default avatars without ( as the last initial

SOFTWARE/OS VERSIONS
Operating System: Arch Linux
KDE Plasma Version: 5.25.3
KDE Frameworks Version: 5.96.0
Qt Version: 5.15.5
Kernel Version: 5.18.9-arch1-1 (64-bit)
Graphics Platform: Wayland
NeoChat: 22.06
Comment 1 Tobias Fella 2022-10-23 15:45:27 UTC
Git commit 10667f98efabc6a7219139c217f79f161bc9c283 by Tobias Fella.
Committed on 23/10/2022 at 15:45.
Pushed by tfella into branch 'master'.

Always pass displayName without matrix id to avatar name

M  +1    -1    imports/NeoChat/Component/Timeline/StateDelegate.qml
M  +1    -1    imports/NeoChat/Component/Timeline/TimelineContainer.qml
M  +6    -0    src/messageeventmodel.cpp
M  +3    -0    src/messageeventmodel.h

https://invent.kde.org/network/neochat/commit/10667f98efabc6a7219139c217f79f161bc9c283