ef2c2d1eb9
CI / changes (pull_request) Successful in 3s
CI / unit (pull_request) Successful in 9s
CI / integration (pull_request) Successful in 18s
CI / ui (pull_request) Successful in 54s
CI / gate (pull_request) Successful in 0s
CI / deploy (pull_request) Successful in 1m18s
A new account's time_zone defaulted to 'UTC' until the player saved a profile, so the robot's sleep window and the turn-timeout away-window sweeper — both anchored to the account zone via account.ResolveZone — ran on UTC for every fresh player, skewing robot-game timing until a manual Settings save. Seed the zone at creation instead, from the client's detected "±HH:MM" offset. - Carry browser_tz on the three account-creating auth requests (TelegramLoginRequest, GuestLoginRequest, EmailRequestRequest — the email account is provisioned at the code-request step, not at login) through the fbs envelope (+ Go/TS codegen), the gateway transcode + backend client, and the backend auth handlers into ProvisionTelegram / ProvisionGuest / ProvisionEmail. - create() now writes time_zone explicitly: the validated detected offset, or 'UTC' (equal to the column default) when absent or malformed — deterministic, never guessed. The column is already NOT NULL DEFAULT 'UTC', so no migration is needed and existing accounts keep 'UTC'. An existing account is never overwritten on re-login. - A detected zero offset is stored as "+00:00" (the zone is known and equals UTC), distinct from the "UTC" default that means "unknown" — which the feedback console's three-zone Filed display already reflects. - Guard the guest handler against an empty payload (the bootstrap historically carried none) so it degrades to no-seed rather than panicking in GetRootAs*. - Tests: zone seeding across Telegram/guest/email plus the "+00:00"/malformed/empty cases and the not-overwrite rule; codec round-trip for the three auth encoders. ARCHITECTURE + FUNCTIONAL(+ru) updated.
61 lines
2.2 KiB
TypeScript
61 lines
2.2 KiB
TypeScript
// automatically generated by the FlatBuffers compiler, do not modify
|
|
|
|
import * as flatbuffers from 'flatbuffers';
|
|
|
|
export class GuestLoginRequest {
|
|
bb: flatbuffers.ByteBuffer|null = null;
|
|
bb_pos = 0;
|
|
__init(i:number, bb:flatbuffers.ByteBuffer):GuestLoginRequest {
|
|
this.bb_pos = i;
|
|
this.bb = bb;
|
|
return this;
|
|
}
|
|
|
|
static getRootAsGuestLoginRequest(bb:flatbuffers.ByteBuffer, obj?:GuestLoginRequest):GuestLoginRequest {
|
|
return (obj || new GuestLoginRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
|
}
|
|
|
|
static getSizePrefixedRootAsGuestLoginRequest(bb:flatbuffers.ByteBuffer, obj?:GuestLoginRequest):GuestLoginRequest {
|
|
bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
|
|
return (obj || new GuestLoginRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
|
}
|
|
|
|
locale():string|null
|
|
locale(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
|
|
locale(optionalEncoding?:any):string|Uint8Array|null {
|
|
const offset = this.bb!.__offset(this.bb_pos, 4);
|
|
return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
|
|
}
|
|
|
|
browserTz():string|null
|
|
browserTz(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
|
|
browserTz(optionalEncoding?:any):string|Uint8Array|null {
|
|
const offset = this.bb!.__offset(this.bb_pos, 6);
|
|
return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
|
|
}
|
|
|
|
static startGuestLoginRequest(builder:flatbuffers.Builder) {
|
|
builder.startObject(2);
|
|
}
|
|
|
|
static addLocale(builder:flatbuffers.Builder, localeOffset:flatbuffers.Offset) {
|
|
builder.addFieldOffset(0, localeOffset, 0);
|
|
}
|
|
|
|
static addBrowserTz(builder:flatbuffers.Builder, browserTzOffset:flatbuffers.Offset) {
|
|
builder.addFieldOffset(1, browserTzOffset, 0);
|
|
}
|
|
|
|
static endGuestLoginRequest(builder:flatbuffers.Builder):flatbuffers.Offset {
|
|
const offset = builder.endObject();
|
|
return offset;
|
|
}
|
|
|
|
static createGuestLoginRequest(builder:flatbuffers.Builder, localeOffset:flatbuffers.Offset, browserTzOffset:flatbuffers.Offset):flatbuffers.Offset {
|
|
GuestLoginRequest.startGuestLoginRequest(builder);
|
|
GuestLoginRequest.addLocale(builder, localeOffset);
|
|
GuestLoginRequest.addBrowserTz(builder, browserTzOffset);
|
|
return GuestLoginRequest.endGuestLoginRequest(builder);
|
|
}
|
|
}
|