feat: add Vite configuration with custom plugins and server settings
This commit is contained in:
@@ -35,6 +35,17 @@ export const initClient = async (session: Session): Promise<MatrixClient> => {
|
||||
await mx.initRustCrypto();
|
||||
|
||||
mx.setMaxListeners(50);
|
||||
|
||||
// Increase max listeners for User objects to prevent warnings when many components
|
||||
// subscribe to presence events (e.g., in member lists)
|
||||
const originalGetUser = mx.getUser.bind(mx);
|
||||
mx.getUser = (userId: string) => {
|
||||
const user = originalGetUser(userId);
|
||||
if (user) {
|
||||
user.setMaxListeners(50);
|
||||
}
|
||||
return user;
|
||||
};
|
||||
|
||||
return mx;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user