perf: Refactor getEnabledApps to filter on credentials passed (#10353)

Co-authored-by: Omar López <[email protected]>
Co-authored-by: Hariom Balhara <[email protected]>
This commit is contained in:
authored and GitHub committed 2023-08-01 16:40:52 +05:30
1 parent 88f542cb0d
commit 6fa54aba46
20 files changed
+76 -27

No files matched your search

+1 -1
View File
@@ -75,7 +75,7 @@ export default class EventManager {
* @param user
*/
constructor(user: EventManagerUser) {
const appCredentials = getApps(user.credentials).flatMap((app) =>
const appCredentials = getApps(user.credentials, true).flatMap((app) =>
app.credentials.map((creds) => ({ ...creds, appName: app.name }))
);
// This includes all calendar-related apps, traditional calendars such as Google Calendar