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: Sendgrid can't create list if name is too long #669

Merged
merged 5 commits into from
Oct 9, 2024

Conversation

sashko9807
Copy link
Member

@sashko9807 sashko9807 commented Sep 7, 2024

Sendgrid's contact list name limit, is towards bytes, not a num of characters.

Closes #1914

Copy link

github-actions bot commented Sep 7, 2024

❌ Not all tests have run for this PR. Please add the run tests label to trigger them.

@sashko9807 sashko9807 added the run tests Allows running the tests workflows for forked repos label Sep 13, 2024
@github-actions github-actions bot removed the run tests Allows running the tests workflows for forked repos label Sep 13, 2024
@@ -0,0 +1,21 @@
export function truncateNameToBytes(name: string, maxBytes: number) {
const encoder = new TextEncoder()
Copy link
Contributor

Choose a reason for hiding this comment

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

can we add some comments about what do those Encoders do?
I guess this does something like utf8 to bytes... and whole play is not to cut in the middle of a symbol.

@slavcho slavcho merged commit c5eb0a7 into podkrepi-bg:master Oct 9, 2024
7 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Subscribe for email notifications for the campaign not work again
2 participants