fetchUsersWithNotificationsForEvents( $eventIds ); $eventMapper->toggleDeleted( $eventIds, $moderate ); /** * Recompute the notification count for the * users whose notifications have been moderated. */ foreach ( $affectedUserIds as $userId ) { $user = User::newFromId( $userId ); MWEchoNotifUser::newFromUser( $user )->resetNotificationCount(); } } }