0
0
mirror of https://github.com/sp-tarkov/server.git synced 2025-02-13 08:30:44 -05:00

Default new profile name to launcher username (#1066)

Instead of always naming new profiles "SPTarkov", use the launcher
username as the default.

This improves the UX as you can quickly click through account creation
on multiple accounts without needing to remember to re-enter a new
profile name for each account
This commit is contained in:
Chomp 2025-01-10 08:54:09 +00:00 committed by GitHub
commit 9612ca2834
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -118,6 +118,12 @@ export class ProfileCallbacks {
* Handle client/game/profile/nickname/reserved * Handle client/game/profile/nickname/reserved
*/ */
public getReservedNickname(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<string> { public getReservedNickname(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<string> {
const fullProfile = this.profileHelper.getFullProfile(sessionID);
if (fullProfile?.info?.username)
{
return this.httpResponse.getBody(fullProfile.info.username);
}
return this.httpResponse.getBody("SPTarkov"); return this.httpResponse.getBody("SPTarkov");
} }