Stage 17 #4: enrich the out-of-app your-turn push + add game-over
CI / changes (pull_request) Successful in 2s
CI / unit (pull_request) Successful in 8s
CI / integration (pull_request) Successful in 12s
CI / ui (pull_request) Successful in 34s
CI / gate (pull_request) Successful in 0s
CI / deploy (pull_request) Successful in 1m20s
CI / changes (pull_request) Successful in 2s
CI / unit (pull_request) Successful in 8s
CI / integration (pull_request) Successful in 12s
CI / ui (pull_request) Successful in 34s
CI / gate (pull_request) Successful in 0s
CI / deploy (pull_request) Successful in 1m20s
The Telegram 'your turn' notification now names the opponent and recaps their last
move (voiced as the opponent: «{name}: my move — «WORD». Score 120:95» for a scoring
play; a short 'swapped / passed, your turn' otherwise), and a new game-over
notification reports the result + final score when a game ends by any path (closing
play, all-pass, resign, timeout). Scores are recipient-first (the reader's score
leads), 2-4 players (120:95:80).
- schema: YourTurnEvent gains opponent_name/last_action/last_word/score_line
(appended, backward-compatible); new GameOverEvent{result, score_line}. Go + UI
bindings regenerated (flatc 23.5.26 + pnpm codegen).
- backend: notify.YourTurn enriched + notify.GameOver; emitMove resolves the mover's
name and emits per-recipient (your_turn to the next mover, game_over to every seat),
with recipient-first score lines built in one place.
- gateway: game_over joins the out-of-app whitelist (routing.go).
- connector: render builds the enriched your_turn + game_over text per language (en/ru).
- tests: notify round-trip (enriched + game_over), emit (enriched fields + game_over to
all seats / per-seat result), connector render (en/ru), routing; integration replay
(play → your_turn with real name; resign → game_over) green.
- docs: ARCHITECTURE push catalog + out-of-app set, FUNCTIONAL (+ _ru), PLAN tracker.
This commit is contained in:
@@ -32,8 +32,36 @@ deadlineUnix():bigint {
|
||||
return offset ? this.bb!.readInt64(this.bb_pos + offset) : BigInt('0');
|
||||
}
|
||||
|
||||
opponentName():string|null
|
||||
opponentName(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
|
||||
opponentName(optionalEncoding?:any):string|Uint8Array|null {
|
||||
const offset = this.bb!.__offset(this.bb_pos, 8);
|
||||
return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
|
||||
}
|
||||
|
||||
lastAction():string|null
|
||||
lastAction(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
|
||||
lastAction(optionalEncoding?:any):string|Uint8Array|null {
|
||||
const offset = this.bb!.__offset(this.bb_pos, 10);
|
||||
return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
|
||||
}
|
||||
|
||||
lastWord():string|null
|
||||
lastWord(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
|
||||
lastWord(optionalEncoding?:any):string|Uint8Array|null {
|
||||
const offset = this.bb!.__offset(this.bb_pos, 12);
|
||||
return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
|
||||
}
|
||||
|
||||
scoreLine():string|null
|
||||
scoreLine(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
|
||||
scoreLine(optionalEncoding?:any):string|Uint8Array|null {
|
||||
const offset = this.bb!.__offset(this.bb_pos, 14);
|
||||
return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
|
||||
}
|
||||
|
||||
static startYourTurnEvent(builder:flatbuffers.Builder) {
|
||||
builder.startObject(2);
|
||||
builder.startObject(6);
|
||||
}
|
||||
|
||||
static addGameId(builder:flatbuffers.Builder, gameIdOffset:flatbuffers.Offset) {
|
||||
@@ -44,15 +72,35 @@ static addDeadlineUnix(builder:flatbuffers.Builder, deadlineUnix:bigint) {
|
||||
builder.addFieldInt64(1, deadlineUnix, BigInt('0'));
|
||||
}
|
||||
|
||||
static addOpponentName(builder:flatbuffers.Builder, opponentNameOffset:flatbuffers.Offset) {
|
||||
builder.addFieldOffset(2, opponentNameOffset, 0);
|
||||
}
|
||||
|
||||
static addLastAction(builder:flatbuffers.Builder, lastActionOffset:flatbuffers.Offset) {
|
||||
builder.addFieldOffset(3, lastActionOffset, 0);
|
||||
}
|
||||
|
||||
static addLastWord(builder:flatbuffers.Builder, lastWordOffset:flatbuffers.Offset) {
|
||||
builder.addFieldOffset(4, lastWordOffset, 0);
|
||||
}
|
||||
|
||||
static addScoreLine(builder:flatbuffers.Builder, scoreLineOffset:flatbuffers.Offset) {
|
||||
builder.addFieldOffset(5, scoreLineOffset, 0);
|
||||
}
|
||||
|
||||
static endYourTurnEvent(builder:flatbuffers.Builder):flatbuffers.Offset {
|
||||
const offset = builder.endObject();
|
||||
return offset;
|
||||
}
|
||||
|
||||
static createYourTurnEvent(builder:flatbuffers.Builder, gameIdOffset:flatbuffers.Offset, deadlineUnix:bigint):flatbuffers.Offset {
|
||||
static createYourTurnEvent(builder:flatbuffers.Builder, gameIdOffset:flatbuffers.Offset, deadlineUnix:bigint, opponentNameOffset:flatbuffers.Offset, lastActionOffset:flatbuffers.Offset, lastWordOffset:flatbuffers.Offset, scoreLineOffset:flatbuffers.Offset):flatbuffers.Offset {
|
||||
YourTurnEvent.startYourTurnEvent(builder);
|
||||
YourTurnEvent.addGameId(builder, gameIdOffset);
|
||||
YourTurnEvent.addDeadlineUnix(builder, deadlineUnix);
|
||||
YourTurnEvent.addOpponentName(builder, opponentNameOffset);
|
||||
YourTurnEvent.addLastAction(builder, lastActionOffset);
|
||||
YourTurnEvent.addLastWord(builder, lastWordOffset);
|
||||
YourTurnEvent.addScoreLine(builder, scoreLineOffset);
|
||||
return YourTurnEvent.endYourTurnEvent(builder);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user