chore: add content type to ics file#24069
Conversation
WalkthroughIn packages/emails/lib/generateIcsFile.ts, the returned object’s "method" field is removed and replaced with two fields: "type" set to "text/calendar; charset=UTF-8; method=REQUEST" and "disposition" set to "attachment". Filename and content fields are unchanged. Function signature, early return behavior, and control flow remain the same. Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
packages/emails/lib/generateIcsFile.ts (1)
39-40: Include charset in Content-Type header.Without an explicit charset, mail agents fall back to US-ASCII per RFC 2046, which can corrupt non-ASCII characters (names, locations, notes) in the generated invite. Extending the MIME type to advertise UTF-8 keeps multilingual content intact.
- type: "text/calendar; method=REQUEST", + type: "text/calendar; charset=UTF-8; method=REQUEST",
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Disabled knowledge base sources:
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (1)
packages/emails/lib/generateIcsFile.ts(1 hunks)
🧰 Additional context used
📓 Path-based instructions (3)
**/*.ts
📄 CodeRabbit inference engine (.cursor/rules/review.mdc)
**/*.ts: For Prisma queries, only select data you need; never useinclude, always useselect
Ensure thecredential.keyfield is never returned from tRPC endpoints or APIs
Files:
packages/emails/lib/generateIcsFile.ts
**/*.{ts,tsx}
📄 CodeRabbit inference engine (.cursor/rules/review.mdc)
Flag excessive Day.js use in performance-critical code; prefer native Date or Day.js
.utc()in hot paths like loops
Files:
packages/emails/lib/generateIcsFile.ts
**/*.{ts,tsx,js,jsx}
⚙️ CodeRabbit configuration file
Flag default exports and encourage named exports. Named exports provide better tree-shaking, easier refactoring, and clearer imports. Exempt main components like pages, layouts, and components that serve as the primary export of a module.
Files:
packages/emails/lib/generateIcsFile.ts
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
E2E results are ready! |
What does this PR do?
Users reported that event is not showing in some mail clients
