Skip to content

Match Google contacts by provider id across sources - #112

Merged
VolodymyrLinuxovich merged 1 commit into
mainfrom
fix/google-contacts-provider-match
Nov 12, 2026
Merged

VolodymyrLinuxovich merged 1 commit into
mainfrom
fix/google-contacts-provider-match

Conversation

@VolodymyrLinuxovich

Copy link
Copy Markdown
Owner

Fixes #111

Summary

When the email lookup misses, contacts.ts still looks up the Google id with the Google Contacts source first. If that misses too, it now looks up the id on any contact of the user. A Gmail contact matched by email on an earlier sync carries that id. So a new primary email in Google no longer creates a second contact. The upsert targets the found contact by its id.

Validation

  • New tests in google-contacts-provider-match.test.ts. The primary email case fails on main.
  • google-contacts-name.test.ts fake gets findFirst.
  • npm test passes.
  • npm run typecheck and lint pass.

@vercel

vercel Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
largevcmodel Ready Ready Preview Nov 12, 2026 8:59am UTC

@VolodymyrLinuxovich
VolodymyrLinuxovich merged commit 0d45acf into main Nov 12, 2026
6 checks passed

This branch was successfully deployed

1 active deployment
Preview — beb40878 Deployed Nov 12, 2026 by vercel[bot]
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.

Google Contacts sync duplicates a Gmail contact after its primary email changes

1 participant