-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
5748 Create contacts for emails sent and received by email aliases #5855
base: main
Are you sure you want to change the base?
5748 Create contacts for emails sent and received by email aliases #5855
Conversation
…es-are-not-associated-with-the-workspacemember
…es-are-not-associated-with-the-workspacemember
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Summary
- Introduced feature flag
IsProfileEmailsReadEnabled
- Updated Google API integration to handle email aliases
- Refactored contact creation logic to include email aliases
- Added services and modules for managing email aliases and OAuth2 clients
- Enhanced message import process to support email aliases and feature flags
30 file(s) reviewed, 9 comment(s)
const featureFlag = await this.featureFlagRepository.findOneBy({ | ||
workspaceId, | ||
key, | ||
value: true, | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider handling potential errors from the database query.
...es/twenty-server/src/engine/core-modules/feature-flag/services/is-feature-enabled.service.ts
Show resolved
Hide resolved
packages/twenty-server/src/modules/calendar/jobs/google-calendar-sync.job.ts
Outdated
Show resolved
Hide resolved
const oAuth2Client = | ||
await this.oAuth2ClientManagerService.getOAuth2Client(connectedAccount); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider adding error handling for the OAuth2 client retrieval.
const emailsResponse = await people.people.get({ | ||
resourceName: 'people/me', | ||
personFields: 'emailAddresses', | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add error handling for the API call to people.people.get
to manage potential failures.
...er/src/modules/connected-account/email-alias-manager/services/email-alias-manager.service.ts
Show resolved
Hide resolved
...nnected-account/oauth2-client-manager/drivers/google/google-oauth2-client-manager.service.ts
Show resolved
Hide resolved
const oAuth2Client = new google.auth.OAuth2( | ||
gmailClientId, | ||
gmailClientSecret, | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add error handling for OAuth2 client creation.
...rc/modules/connected-account/oauth2-client-manager/services/oauth2-client-manager.service.ts
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Summary
(updates since last review)
- Corrected error message to reference
connectedAccountId
- Retrieve
connectedAccount
usingconnectedAccountRepository
before refreshing access token
1 file(s) reviewed, no comment(s)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Summary
(updates since last review)
- Removed
GoogleAPIsProviderEnabledGuard
fromgoogle-apis-auth.controller.ts
- Introduced feature flag checks in
google-apis-oauth.guard.ts
- Updated contact creation logic to include email aliases
- Deleted
google-apis-provider-enabled.guard.ts
- Potential security issue:
googleAuthGetAccessToken
method now has no guards applied
3 file(s) reviewed, no comment(s)
…es-are-not-associated-with-the-workspacemember
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Summary
(updates since last review)
- Added feature flag for email alias handling
- Updated contact creation logic to include email aliases
- Replaced custom tooltips with
AppTooltip
fromtwenty-ui
- Introduced new GraphQL filter types and operands
- Added unit tests for various utility functions and components
196 file(s) reviewed, no comment(s)
…es-are-not-associated-with-the-workspacemember
Closes #5748
https://www.googleapis.com/auth/profile.emails.read
when connecting an account