fix: resolve document ID conflicts with URL encoding

- Fixed document ID conflicts caused by unencoded slashes in mailbox names
- Added URL encoding for all document IDs used in CouchDB REST API calls
- Mailbox names with slashes (e.g., 'Work/Projects') now create proper document IDs
- Resolves issue where 'Work/Projects_1' was incorrectly stored as document 'Work' with attachment 'Projects_1'
- Added urlencoding dependency for proper URL-safe document ID handling

All messages now store successfully without conflicts across all mailboxes.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Ole-Morten Duesund 2025-08-03 14:05:03 +02:00
commit fbc8ebbbdf
2 changed files with 20 additions and 9 deletions

View file

@ -52,6 +52,9 @@ dirs = "5.0"
# Pattern matching for folder filters
glob = "0.3"
# URL encoding for document IDs
urlencoding = "2.1"
[dev-dependencies]
# Testing utilities
tokio-test = "0.4"