mirror of
https://github.com/sp-tarkov/server.git
synced 2025-02-13 05:30:43 -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:
commit
9612ca2834
@ -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");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user