@@ -338,7 +338,11 @@ export class WidgetApi extends EventEmitter {
338338 return this . transport . send < IModalWidgetReturnData > ( WidgetApiFromWidgetAction . CloseModalWidget , data ) . then ( ) ;
339339 }
340340
341- public sendRoomEvent ( eventType : string , content : unknown , roomId ?: string ) : Promise < ISendEventFromWidgetResponseData > {
341+ public sendRoomEvent (
342+ eventType : string ,
343+ content : unknown ,
344+ roomId ?: string ,
345+ ) : Promise < ISendEventFromWidgetResponseData > {
342346 return this . transport . send < ISendEventFromWidgetRequestData , ISendEventFromWidgetResponseData > (
343347 WidgetApiFromWidgetAction . SendEvent ,
344348 { type : eventType , content, room_id : roomId } ,
@@ -357,7 +361,12 @@ export class WidgetApi extends EventEmitter {
357361 ) ;
358362 }
359363
360- public readRoomEvents ( eventType : string , limit = 25 , msgtype ?: string , roomIds ?: ( string | Symbols . AnyRoom ) [ ] ) : Promise < unknown > {
364+ public readRoomEvents (
365+ eventType : string ,
366+ limit = 25 ,
367+ msgtype ?: string ,
368+ roomIds ?: ( string | Symbols . AnyRoom ) [ ] ,
369+ ) : Promise < unknown > {
361370 const data : IReadEventFromWidgetRequestData = { type : eventType , msgtype : msgtype , limit} ;
362371 if ( roomIds ) {
363372 if ( roomIds . includes ( Symbols . AnyRoom ) ) {
@@ -372,8 +381,17 @@ export class WidgetApi extends EventEmitter {
372381 ) . then ( r => r . events ) ;
373382 }
374383
375- public readStateEvents ( eventType : string , limit = 25 , stateKey ?: string , roomIds ?: ( string | Symbols . AnyRoom ) [ ] ) : Promise < unknown > {
376- const data : IReadEventFromWidgetRequestData = { type : eventType , state_key : stateKey === undefined ? true : stateKey , limit} ;
384+ public readStateEvents (
385+ eventType : string ,
386+ limit = 25 ,
387+ stateKey ?: string ,
388+ roomIds ?: ( string | Symbols . AnyRoom ) [ ] ,
389+ ) : Promise < unknown > {
390+ const data : IReadEventFromWidgetRequestData = {
391+ type : eventType ,
392+ state_key : stateKey === undefined ? true : stateKey ,
393+ limit,
394+ } ;
377395 if ( roomIds ) {
378396 if ( roomIds . includes ( Symbols . AnyRoom ) ) {
379397 data . room_ids = Symbols . AnyRoom ;
0 commit comments