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

Validate body req of webhook and make tagUser optional #274

Merged
merged 2 commits into from
Jan 2, 2024

Conversation

danibonilha
Copy link
Contributor

@danibonilha danibonilha commented Dec 28, 2023

This PR adds a simple validation on the request body of discord's webhook and makes tagUser param optional. I've made it default to "0" because I'm assuming n8n sends "0" since there's a check for that, but if that's not the case we could change this just to check if the value is a string, to not blow up while calling .split which I've also changed the placement, bc memberIds was not used anywhere else, so it makes more sense to move it.

Also it updates the admin list.

Not sure why tests are failing, seems a port issue, maybe it's the worker ?

@danibonilha danibonilha self-assigned this Dec 28, 2023
@danibonilha danibonilha force-pushed the dani/remove-required-tag-user branch 3 times, most recently from ba73105 to d03e12b Compare December 28, 2023 15:54
@danibonilha danibonilha force-pushed the dani/remove-required-tag-user branch from d03e12b to b5c3b6d Compare December 28, 2023 17:28
Copy link
Contributor

@Shadowfiend Shadowfiend left a comment

Choose a reason for hiding this comment

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

Love it, thank you!

@Shadowfiend Shadowfiend merged commit 6f935aa into main Jan 2, 2024
5 of 6 checks passed
@Shadowfiend Shadowfiend deleted the dani/remove-required-tag-user branch January 2, 2024 21:08
@Shadowfiend
Copy link
Contributor

Will poke at the tests separately, though that might block deploy post-merge. We'll see.

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.

2 participants