fix(chat): KeyNotFoundException dans HubConnectionManager.OnConnected

ChatUserNames n'etait jamais alimente (relique d'un SetUserName disparu),
ce qui faisait lever KeyNotFoundException a chaque connexion SignalR et
fermait immediatement la connexion cote client ("Déconnecté (The server
closed the connection...)" dans PostIt).

- IConnexionManager.OnConnected prend desormais le userName en parametre
- HubConnectionManager.OnConnected alimente ChatUserNames et ChatCxIds
- ChatHub.OnConnectedAsync passe le userName resolu depuis les claims

Inclut aussi les changements PostIt lies (bandeau de statut avec
commande d'action, handlers Reconnecting/Reconnected/Closed).
This commit is contained in:
Paul Schneider 2026-10-03 23:45:22 +01:00
commit 75bb2600b5
Signed by: notazof
GPG key ID: AD4B9B545FBD7D12
6 changed files with 70 additions and 16 deletions

View file

@ -4,7 +4,7 @@ namespace Yavsc.Services
{
public interface IConnexionManager {
string GetUserName (string cxId);
void OnConnected(string cxId, bool isCop);
void OnConnected(string cxId, string userName, bool isCop);
bool IsConnected(string candidate);
void OnDisconnected (string cxId);