Interface ReviewMessage

Reviews are constructed by a stream of modifications messages, this interface describes the format of those modification messages. A message can contain any number of the fields listed.

interface ReviewMessage {
    chat?: {
        channel: string;
        chat_id: string;
        date: number;
        from: number;
        moves: string | AdHocPackedMove;
        player_id: number;
    };
    clearpen?: boolean;
    controller?: number | {
        id: number;
        username: string;
    };
    delete?: number;
    f?: number;
    gamedata?: GobanEngineConfig;
    k?: {
        [mark: string]: string;
    };
    m?: string;
    om?: [number, number, number];
    owner?: number | {
        id: number;
        username: string;
    };
    pen?: string;
    player_update?: JGOFPlayerSummary;
    pp?: [number, number];
    remove-chat?: string;
    review_id?: number;
    t?: string;
    t+?: string;
    ts?: number;
    undo?: boolean;
}

Properties

chat?: {
    channel: string;
    chat_id: string;
    date: number;
    from: number;
    moves: string | AdHocPackedMove;
    player_id: number;
}

Chat message

Type declaration

  • channel: string
  • chat_id: string
  • date: number
  • from: number

    Turn number

  • moves: string | AdHocPackedMove

    this might just be "string", i'm not entirely sure

  • player_id: number
clearpen?: boolean

Clears the pen drawings on the node

controller?: number | {
    id: number;
    username: string;
}

Sets the controller of the review

Type declaration

  • id: number
  • username: string
delete?: number

Delete

f?: number

from (move number)

Initial gamedata to review

k?: {
    [mark: string]: string;
}

Marks made

Type declaration

  • [mark: string]: string
m?: string

Moves made

om?: [number, number, number]

official move [reviewing live game]

owner?: number | {
    id: number;
    username: string;
}

Sets the owner of the review

Type declaration

  • id: number
  • username: string
pen?: string

pen color / pen start

player_update?: JGOFPlayerSummary

Updated information about the players, such as name etc.

pp?: [number, number]

pen point

remove-chat?: string

Remove's the given chat by id

review_id?: number

The review ID. This is used when sending from the client to the server, but is not sent by the server back to the client (as the id is encoded in the message event name)

t?: string

text note for the current node

t+?: string

text append to the current node

ts?: number

timestamp (ms)

undo?: boolean

official undo [reviewing live game]