You've already forked Nitro_Render_V3
mirror of
https://github.com/duckietm/Nitro_Render_V3.git
synced 2026-06-20 15:36:18 +00:00
feat(communication): housekeeping rooms domain — 7 composers + 2 events
* Outgoing 9110-9116: find-room-by-id, search-rooms (exact|prefix), room-state (open|close toggle), mute-room, kick-all-from-room, transfer-room-ownership, delete-room. * Incoming 9202 HousekeepingRoomDetailEvent + 9203 RoomListEvent. * HousekeepingRoomData parser data class with the 11 IHousekeepingRoom fields. Single-room and list events share the same data class via composition. `yarn compile:fast` clean.
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
import { IMessageDataWrapper } from '@nitrots/api';
|
||||
|
||||
export class HousekeepingRoomData
|
||||
{
|
||||
private _id: number = 0;
|
||||
private _name: string = '';
|
||||
private _description: string = '';
|
||||
private _ownerId: number = 0;
|
||||
private _ownerName: string = '';
|
||||
private _userCount: number = 0;
|
||||
private _maxUsers: number = 0;
|
||||
private _isLocked: boolean = false;
|
||||
private _isMuted: boolean = false;
|
||||
private _isPublic: boolean = false;
|
||||
private _createdAt: number = 0;
|
||||
|
||||
constructor(wrapper: IMessageDataWrapper)
|
||||
{
|
||||
if(!wrapper) throw new Error('invalid_wrapper');
|
||||
|
||||
this._id = wrapper.readInt();
|
||||
this._name = wrapper.readString();
|
||||
this._description = wrapper.readString();
|
||||
this._ownerId = wrapper.readInt();
|
||||
this._ownerName = wrapper.readString();
|
||||
this._userCount = wrapper.readInt();
|
||||
this._maxUsers = wrapper.readInt();
|
||||
this._isLocked = wrapper.readBoolean();
|
||||
this._isMuted = wrapper.readBoolean();
|
||||
this._isPublic = wrapper.readBoolean();
|
||||
this._createdAt = wrapper.readInt();
|
||||
}
|
||||
|
||||
public get id(): number { return this._id; }
|
||||
public get name(): string { return this._name; }
|
||||
public get description(): string { return this._description; }
|
||||
public get ownerId(): number { return this._ownerId; }
|
||||
public get ownerName(): string { return this._ownerName; }
|
||||
public get userCount(): number { return this._userCount; }
|
||||
public get maxUsers(): number { return this._maxUsers; }
|
||||
public get isLocked(): boolean { return this._isLocked; }
|
||||
public get isMuted(): boolean { return this._isMuted; }
|
||||
public get isPublic(): boolean { return this._isPublic; }
|
||||
public get createdAt(): number { return this._createdAt; }
|
||||
}
|
||||
Reference in New Issue
Block a user