Bug 504842

Summary: Clicking the Friends space when the last room hasn't been yet established launches a web browser pointed at http://dm/
Product: [Applications] NeoChat Reporter: John Kizer <john.kizer>
Component: GeneralAssignee: Tobias Fella <fella>
Status: RESOLVED FIXED    
Severity: minor CC: carl, josh, manuel
Priority: NOR    
Version First Reported In: git master   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description John Kizer 2025-05-27 04:43:58 UTC
SUMMARY
If you haven't visited a room in the Friends list since the "last room" state started being stored by NeoChat, then clicking on the Friends icon in the Spaces sidebar does switch to that Friends view, but also launches the URL http://dm/ in my default web browser.

Until you click on a room in the Friends list, this can be repeated.

STEPS TO REPRODUCE
1. In ~/.local/state/neochatstaterc , in the [LastOpenRoom] section, check that there is no DM=!roomID key present, and delete it if it's there (to recreate the state of having not opened a Friends room since the feature was introduced)
2. Click on the Friends icon in the Spaces sidebar

OBSERVED RESULT
The URL http://dm/ is launched in my default web browser - underneath that, the Friends room list opens in NeoChat.

EXPECTED RESULT
The Friends room list opens in NeoChat, with no external browser pages launched.

SOFTWARE/OS VERSIONS
Operating System: Fedora Linux 42
KDE Plasma Version: 6.4.80
KDE Frameworks Version: 6.15.0
Qt Version: 6.9.0
Kernel Version: 6.14.6-300.fc42.x86_64 (64-bit)
Graphics Platform: Wayland
Processors: 16 × AMD Ryzen 7 7800X3D 8-Core Processor
Memory: 32 GiB of RAM (30.4 GiB usable)
Graphics Processor 1: NVIDIA GeForce RTX 4070 SUPER
Graphics Processor 2: AMD Radeon Graphics
Manufacturer: Micro-Star International Co., Ltd.
Product Name: MS-7D78
System Version: 1.0

ADDITIONAL INFORMATION
Seems related to https://invent.kde.org/network/neochat/-/merge_requests/2297 - ridiculously minor since it's likely a one-time thing, but could really throw someone off when they encounter it, and possibly make them think something is really wrong :-) Maybe that key can be pre-staged with something innocuously null that doesn't lead to the path that launches a URL?
Comment 1 Manuel Alcaraz 2025-05-30 12:00:39 UTC
I also get my browser opened with http://home most of the time I open NeoChat.
Comment 2 Bug Janitor Service 2025-05-30 12:43:28 UTC
A possibly relevant merge request was started @ https://invent.kde.org/network/neochat/-/merge_requests/2303
Comment 3 Joshua Goins 2025-05-30 13:27:26 UTC
Git commit bc7a663f929ba3adccb648b836b16ce2be0464c8 by Joshua Goins.
Committed on 30/05/2025 at 12:43.
Pushed by redstrate into branch 'master'.

Prevent opening the non-existent "Home" space in your web browser

I carved out an exception for "DM", but we need it for "Home" too.

M  +1    -1    src/app/roommanager.cpp

https://invent.kde.org/network/neochat/-/commit/bc7a663f929ba3adccb648b836b16ce2be0464c8