Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Fixed too strict zod-schema for global messages #484

Merged
merged 1 commit into from
Jan 29, 2025

Conversation

strandlie
Copy link
Contributor

@strandlie strandlie commented Jan 27, 2025

Don't know if the old implementation is on purpose, but it seems a little odd so here is a suggestion.

The old implementation would not accept a globalMessage unless all of the values in context existed in GlobalMessageContextEnum. Examples of where this is not true are app-assistant and app-ticketing.

Added a little flexibility where values in GlobalMessageContextEnum are checked and cast as such, but other values are discarded. Also added some documentation on this.

Copy link

vercel bot commented Jan 27, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
planner-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 27, 2025 1:27pm

Copy link
Member

@rosvik rosvik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense!

@strandlie strandlie merged commit 4e65522 into main Jan 29, 2025
5 checks passed
@strandlie strandlie deleted the strandlie/fix-global-message-schema branch January 29, 2025 14:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants