Skip to content

Wrong contact selected when email addresses are similar #644

Description

@SamuelPlentz

Description

Quicktext can select the wrong contact when multiple contacts have similar email addresses.

For example, consider these two contacts:

  • John Doedoe@example.com
  • Jane Doejane.doe@example.com

When composing a message to:

doe@example.com

browser.contacts.quickSearch() may return both contacts. The current code simply selects the first contact of type contact:

let card = cards.find(c => c.type == "contact");

Depending on the order returned by Thunderbird, Quicktext may therefore use the contact information of Jane Doe instead of John Doe.

The contact lookup should preferably select a contact whose email address exactly matches the recipient address.

If no exact match is available, falling back to the current behavior would preserve the existing behavior for cases where Thunderbird does not return an exact email match.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions