Skip to content
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

Fix contact creation #10540

Merged
merged 2 commits into from
Feb 27, 2025
Merged

Fix contact creation #10540

merged 2 commits into from
Feb 27, 2025

Conversation

bosiraphael
Copy link
Contributor

Fixes the following bug:
When I connect an account, a contact is created for that email if the domain name differs from the workspace domain name.

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Summary

This PR fixes a bug in the contact creation process by preventing the system from creating a contact for the user's own email address when domain names differ.

  • Modified filterOutSelfAndContactsFromCompanyOrWorkspace in packages/twenty-server/src/modules/contact-creation-manager/utils/filter-out-contacts-from-company-or-workspace.util.ts to include the connected account's handle in the filtering logic
  • The fix ensures the user's primary email address is properly excluded from contact creation, not just alias addresses
  • The change maintains compatibility with the existing domain name filtering while adding an additional check for the exact handle match

1 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings | Greptile

@bosiraphael bosiraphael merged commit 05f15a8 into main Feb 27, 2025
32 checks passed
@bosiraphael bosiraphael deleted the r--fix-contact-creation branch February 27, 2025 10:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants