@@ -636,13 +636,12 @@ export class AbacService extends ServiceClass implements IAbacService {
636636 const userRemovalPromises = [ ] ;
637637 for await ( const doc of cursor ) {
638638 usersToRemove . push ( doc . _id ) ;
639- void Audit . actionPerformed ( { _id : doc . _id , username : doc . username } , { _id : rid } , 'room-attributes-change' ) ;
640639 userRemovalPromises . push (
641640 limit ( ( ) =>
642641 Room . removeUserFromRoom ( rid , doc , {
643642 skipAppPreEvents : true ,
644643 customSystemMessage : 'abac-removed-user-from-room' as const ,
645- } ) ,
644+ } ) . then ( ( ) => void Audit . actionPerformed ( { _id : doc . _id , username : doc . username } , { _id : rid } , 'room-attributes-change' ) ) ,
646645 ) ,
647646 ) ;
648647 }
@@ -681,13 +680,12 @@ export class AbacService extends ServiceClass implements IAbacService {
681680
682681 const removalPromises : Promise < void > [ ] = [ ] ;
683682 for await ( const room of cursor ) {
684- void Audit . actionPerformed ( { _id : user . _id , username : user . username } , { _id : room . _id } , 'ldap-sync' ) ;
685683 removalPromises . push (
686684 limit ( ( ) =>
687685 Room . removeUserFromRoom ( room . _id , user , {
688686 skipAppPreEvents : true ,
689687 customSystemMessage : 'abac-removed-user-from-room' as const ,
690- } ) ,
688+ } ) . then ( ( ) => void Audit . actionPerformed ( { _id : user . _id , username : user . username } , { _id : room . _id } , 'ldap-sync' ) ) ,
691689 ) ,
692690 ) ;
693691 }
0 commit comments