Skip to content

five-on-it / packages/protocol/src/social / encodeRoster

Function: encodeRoster() ​

encodeRoster(message): string

Defined in: packages/protocol/src/social.ts:172

Serializes the roster as a text frame.

Parameters ​

message ​

moderated ​

boolean = ...

Whether the room is public: its chat goes through the platform's moderation.

players ​

object[] = ...

The players, in the order they came.

type ​

"roster" = ...

vote ​

{ by: number; needed: number; seconds: number; target: number; voted: boolean; yes: number; } | null = ...

The vote to kick under way: whom, who started it, the yes so far, the yes it needs, the seconds left; the receiver's own vote.

you ​

number = ...

The receiver's client id.

Returns ​

string