feat: get user for browser

This commit is contained in:
amhsirak
2025-03-07 22:43:06 +05:30
parent e9d3fcebad
commit 59e494c9be

View File

@@ -183,5 +183,18 @@ export class BrowserPool {
return browserId;
};
/**
* Returns the user ID associated with a browser ID.
*
* @param browserId the browser ID to find the user for
* @returns the user ID for the browser, or null if the browser doesn't exist
*/
public getUserForBrowser = (browserId: string): string | null => {
if (!this.pool[browserId]) {
return null;
}
return this.pool[browserId].userId;
};
}