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: filter out empty strings handlers in participant matching #10599

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

zolfariot
Copy link

If any mail parsed by twenty has empty fields (for example To: or From:), an empty token is added to the search query for matching people in the CRM. If any entry in the CRM has an empty email field, all the emails with an empty token will be associated to that entry.

This modification filter empty tokens before matching..

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 an issue where empty email fields in participant matching were causing incorrect associations in the CRM by filtering out empty handles before matching.

  • Added filtering logic in packages/twenty-server/src/modules/match-participant/match-participant.service.ts to remove empty strings from handles before matching participants
  • Prevents the system from incorrectly associating all emails with empty tokens to any CRM entry that has an empty email field
  • Improves data integrity by ensuring only valid email addresses are used in the participant matching process
  • Addresses a subtle but important edge case in the email parsing system that could lead to data corruption

Greptile AI

💡 (1/5) You can manually trigger the bot by mentioning @greptileai in a comment!

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

Copy link
Contributor

github-actions bot commented Mar 2, 2025

Welcome!

Hello there, congrats on your first PR! We're excited to have you contributing to this project.
By submitting your Pull Request, you acknowledge that you agree with the terms of our Contributor License Agreement.

Generated by 🚫 dangerJS against 17d2cd0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant