Skip to content

Identities on a new channel are stored unnormalized #50

Description

@SirLouen

An identity on any channel other than email or phone is stored exactly as typed, so two spellings of the same handle become two contacts and the duplicate check misses them.

Current state: normalizeIdentifier in internal/contact/identity.go lowercases email, reduces phone to digits, and returns everything else verbatim from its default branch. Only email and phone are writable today, so nothing is broken yet. The moment a third channel is accepted, @MariaPerez and @mariaperez land as separate identities under UNIQUE (channel, identifier) and both resolve to different contacts.

Proposal: refuse a channel that has no normalizer instead of silently passing the raw value through. Adding a channel then forces the decision about how its identifier is compared, which is the decision that keeps deduplication working.

Trigger: before any new channel joins the writable set.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions