chore: enable U8 clients to log in #2971

Merged
Sainan merged 1 commits from u8 into main 2025-11-02 23:25:20 -08:00
3 changed files with 12 additions and 1 deletions

View File

@ -109,12 +109,19 @@ const createLoginResponse = (
const resp: ILoginResponse = {
id: account.id,
DisplayName: account.DisplayName,
CountryCode: account.CountryCode,
AmazonAuthToken: account.AmazonAuthToken,
AmazonRefreshToken: account.AmazonRefreshToken,
Nonce: account.Nonce,
BuildLabel: buildLabel
};
if (version_compare(buildLabel, "2014.10.24.08.24") >= 0) {
// U15 and up
resp.CountryCode = account.CountryCode;
} else {
// U8
resp.NatHash = "0";
resp.SteamId = "0";
}
if (version_compare(buildLabel, "2015.02.13.10.41") >= 0) {
resp.NRS = [config.nrsAddress ?? myAddress];
}

View File

@ -170,6 +170,7 @@ import { upgradeOperatorController } from "../controllers/api/upgradeOperatorCon
import { upgradesController } from "../controllers/api/upgradesController.ts";
import { valenceSwapController } from "../controllers/api/valenceSwapController.ts";
import { wishlistController } from "../controllers/api/wishlistController.ts";
import { worldStateController } from "../controllers/dynamic/worldStateController.ts";
const apiRouter = express.Router();
@ -235,6 +236,7 @@ apiRouter.get("/surveys.php", surveysController);
apiRouter.get("/trading.php", tradingController);
apiRouter.get("/updateSession.php", updateSessionGetController);
apiRouter.get("/upgradeOperator.php", upgradeOperatorController);
apiRouter.get("/worldState.php", worldStateController); // U8
// post
apiRouter.post("/abortDojoComponent.php", abortDojoComponentController);

View File

@ -55,6 +55,8 @@ export interface ILoginResponse extends IAccountAndLoginResponseCommons {
DTLS?: number;
IRC?: string[];
HUB?: string;
NatHash?: string;
SteamId?: string;
}
export interface IGroup {