SignalR chat connection OK

This commit is contained in:
Paul Schneider 2026-10-03 22:47:47 +01:00
commit b22a26f61e
Signed by: notazof
GPG key ID: AD4B9B545FBD7D12
43 changed files with 430 additions and 252 deletions

View file

@ -53,23 +53,6 @@ namespace Yavsc.Services
_localizer = stringLocFactory.Create(typeof(HubConnectionManager));
}
public void SetUserName(string cxId, string userName)
{
string oldUname;
if (ChatUserNames.TryGetValue(cxId, out oldUname))
{
// this is a rename
if (oldUname == userName) return;
ChatCxIds[userName] = ChatCxIds[oldUname];
ChatCxIds[oldUname] = null;
}
else
{
// this is a connexion
ChatCxIds[userName] = new List<string>() { cxId };
}
ChatUserNames[cxId] = userName;
}
// Username must have been set before calling this method.
public void OnConnected(string cxId, bool isCop)
{