Skip to content

fix: strip commas from email before contacts#257

Merged
andrinoff merged 1 commit intofloatpane:masterfrom
ElshadHu:fix/comma-contacts
Mar 9, 2026
Merged

fix: strip commas from email before contacts#257
andrinoff merged 1 commit intofloatpane:masterfrom
ElshadHu:fix/comma-contacts

Conversation

@ElshadHu
Copy link
Copy Markdown
Contributor

@ElshadHu ElshadHu commented Mar 9, 2026

What Changed

Split msg.To by comma before saving so each recipient is saved individually. This also handles the trailing , the composer appends after suggestion selection. I skipped the empty parts from the split

I added comma trimming in AddContact just in case for persistence part

After all, I sent two emails to friend@floatpane.com, and checked out the contacts.json:

{
  "contacts": [
    {
      "name": "",
      "email": "friend@floatpane.com",
      "last_used": "2026-03-09T10:08:44.582981-04:00",
      "use_count": 2
    }
  ],
  "updated_at": "2026-03-09T10:08:44.582995-04:00"
}      

there is no duplicate. If there is any issue, please let me know 🙌.
Closes #251

@ElshadHu ElshadHu requested a review from andrinoff as a code owner March 9, 2026 14:28
@github-actions github-actions Bot added the bug Something isn't working label Mar 9, 2026
@andrinoff
Copy link
Copy Markdown
Member

Thank you for your contribution!

Will check in a few hours!

@andrinoff andrinoff merged commit 00f48f7 into floatpane:master Mar 9, 2026
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BUG: Contacts saved with commas

2 participants