Skip to content

SudoSOS Back-end API / service/websocket/room-policy / RoomPolicyRegistry

Class: RoomPolicyRegistry ​

Registry for room policies.

Constructors ​

Constructor ​

ts
new RoomPolicyRegistry(): RoomPolicyRegistry;

Returns ​

RoomPolicyRegistry

Methods ​

findRegistration() ​

ts
findRegistration(room): RoomRegistration;

Finds a room registration that matches the given room name.

Parameters ​

ParameterTypeDescription
roomstringThe room name to match.

Returns ​

RoomRegistration

The matching registration or undefined.


register() ​

ts
register(registration): void;

Registers a room with its policy.

Parameters ​

ParameterTypeDescription
registrationRoomRegistrationThe room registration.

Returns ​

void