Skip to content

Improvements to similar contact name comparison#10639

Open
hak0996 wants to merge 1 commit intodev-mailfrom
10497-contact-merging-whitespace
Open

Improvements to similar contact name comparison#10639
hak0996 wants to merge 1 commit intodev-mailfrom
10497-contact-merging-whitespace

Conversation

@hak0996
Copy link
Copy Markdown
Contributor

@hak0996 hak0996 commented Apr 8, 2026

Normailze contact names before comparison.

Close #10497

Normailze contact names before comparison.

Close #10497

Co-authored-by: hrb-hub <hrb-hub@users.noreply.github.com>
@hak0996 hak0996 linked an issue Apr 8, 2026 that may be closed by this pull request
7 tasks
export function _normalizeContactName(name: string): string {
return name
.toLowerCase()
.split(" ")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

is there a reason we don't trim before the split?

o.check(_areContactsNamesSimilar(c1, c2)).equals(true)
c1 = createEmailPhoneContact("anton", "schmidt", null)
c2 = createEmailPhoneContact("schmidt", "anton", null)
o.check(_areContactsNamesSimilar(c1, c2)).equals(true) //mistake?
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I am also wondering about this, but this checking is just for suggesting contacts to merge, right? I can see names getting mixed up so this might be good, just to check. It could also be annoying if you get a lot of false positives.

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.

Ignore extra whitespace when comparing contacts for merging

2 participants