File tree Expand file tree Collapse file tree 2 files changed +5
-9
lines changed
packages/federation-sdk/src/services Expand file tree Collapse file tree 2 files changed +5
-9
lines changed Original file line number Diff line number Diff line change @@ -305,11 +305,7 @@ export class EventAuthorizationService {
305305 return true ;
306306 }
307307
308- const serverAclContent = aclEvent . getContent ( ) as {
309- allow ?: string [ ] ;
310- deny ?: string [ ] ;
311- allow_ip_literals ?: boolean ;
312- } ;
308+ const serverAclContent = aclEvent . getContent ( ) ;
313309 const {
314310 allow = [ ] ,
315311 deny = [ ] ,
Original file line number Diff line number Diff line change @@ -345,15 +345,15 @@ export class StateService {
345345 return new RoomState ( state ) ;
346346 }
347347
348- async getStateEventsByType (
348+ async getStateEventsByType < P extends PduType > (
349349 roomId : string ,
350- type : PduType ,
351- ) : Promise < PersistentEventBase [ ] > {
350+ type : P ,
351+ ) : Promise < PersistentEventBase < RoomVersion , P > [ ] > {
352352 const state = await this . getFullRoomState ( roomId ) ;
353353 const events = [ ] ;
354354 for ( const [ , event ] of state ) {
355355 if ( event . type === type ) {
356- events . push ( event ) ;
356+ events . push ( event as PersistentEventBase < RoomVersion , P > ) ;
357357 }
358358 }
359359 return events ;
You can’t perform that action at this time.
0 commit comments