File tree Expand file tree Collapse file tree 6 files changed +64
-1
lines changed
Expand file tree Collapse file tree 6 files changed +64
-1
lines changed Load Diff Large diffs are not rendered by default.
Original file line number Diff line number Diff line change @@ -168,6 +168,7 @@ export class IncomingHeader
168168 public static ROOM_SPECTATOR = 1033 ;
169169 public static ROOM_THICKNESS = 3547 ;
170170 public static ROOM_GET_FILTER_WORDS = 2937 ;
171+ public static ROOM_MESSAGE_NOTIFICATION = 1634 ;
171172 public static INFO_FEED_ENABLE = 3284 ;
172173 public static SECURITY_MACHINE = 1488 ;
173174 public static MYSTERY_BOX_KEYS = 2833 ;
Original file line number Diff line number Diff line change 1+ import { IMessageEvent } from '../../../../../../api' ;
2+ import { MessageEvent } from '../../../../../../events' ;
3+ import { RoomMessageNotificationMessageParser } from '../../../parser' ;
4+
5+ export class RoomMessageNotificationMessageEvent extends MessageEvent implements IMessageEvent
6+ {
7+ constructor ( callBack : Function )
8+ {
9+ super ( callBack , RoomMessageNotificationMessageParser ) ;
10+ }
11+
12+ public getParser ( ) : RoomMessageNotificationMessageParser
13+ {
14+ return this . parser as RoomMessageNotificationMessageParser ;
15+ }
16+ }
Original file line number Diff line number Diff line change @@ -12,5 +12,6 @@ export * from './LoveLockFurniStartEvent';
1212export * from './OneWayDoorStatusMessageEvent' ;
1313export * from './RequestSpamWallPostItMessageEvent' ;
1414export * from './RoomDimmerPresetsMessageEvent' ;
15+ export * from './RoomMessageNotificationMessageEvent' ;
1516export * from './wall' ;
1617export * from './youtube' ;
Original file line number Diff line number Diff line change 1+ import { IMessageDataWrapper , IMessageParser } from '../../../../../../api' ;
2+
3+ export class RoomMessageNotificationMessageParser implements IMessageParser
4+ {
5+ private _roomId : number ;
6+ private _roomName : string ;
7+ private _messageCount : number ;
8+
9+ public flush ( ) : boolean
10+ {
11+ this . _roomId = - 1 ;
12+ this . _roomName = null ;
13+ this . _messageCount = - 1 ;
14+
15+ return true ;
16+ }
17+
18+ public parse ( wrapper : IMessageDataWrapper ) : boolean
19+ {
20+ if ( ! wrapper ) return false ;
21+
22+ this . _roomId = wrapper . readInt ( ) ;
23+ this . _roomName = wrapper . readString ( ) ;
24+ this . _messageCount = wrapper . readInt ( ) ;
25+
26+ return true ;
27+ }
28+
29+ public get roomId ( ) : number
30+ {
31+ return this . _roomId ;
32+ }
33+
34+ public get roomName ( ) : string
35+ {
36+ return this . _roomName ;
37+ }
38+
39+ public get messageCount ( ) : number
40+ {
41+ return this . _messageCount ;
42+ }
43+ }
Original file line number Diff line number Diff line change @@ -13,5 +13,6 @@ export * from './OneWayDoorStatusMessageParser';
1313export * from './RequestSpamWallPostItMessageParser' ;
1414export * from './RoomDimmerPresetsMessageData' ;
1515export * from './RoomDimmerPresetsMessageParser' ;
16+ export * from './RoomMessageNotificationMessageParser' ;
1617export * from './wall' ;
1718export * from './youtube' ;
You can’t perform that action at this time.
0 commit comments