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 utah react parser #215

Closed
earlduque opened this issue Sep 29, 2023 · 4 comments · Fixed by #217
Closed

Fix utah react parser #215

earlduque opened this issue Sep 29, 2023 · 4 comments · Fixed by #217
Assignees

Comments

@earlduque
Copy link
Collaborator

https://github.com/ServiceNowDevProgram/SlackerBot/blob/35793fc86ba7b320090fecfc6df40aaad10a3eb3/Parsers/Utah%20triggers%20Utah%20react.js

As found in #213, this parse doesn't work as expected because Slack interprets #utah as a channel call and changes the text to the unique ID of the channel, so the parser never actually sees the word "utah" and thus never runs

image

Change this parser so that it runs whenever someone says utah as a standalone word

@Ladirinia
Copy link
Contributor

Happy to take this one over (this time in October :p). Just to be sure, by standalone you mean utah surrounded by two spaces, right? Such as We use utah now? Or really simply whenever in any sentence utah is mentioned, including such as xyutahyx?

@earlduque
Copy link
Collaborator Author

it's a way to do regex, actually!

image

putting \b before and after your word basically says "there should be a word boundary here" not another letter.
Spaces could work but doing word boundaries also factors for things like punctuation or newlines

@earlduque
Copy link
Collaborator Author

earlduque commented Sep 29, 2023

i'm going to assign this to you @Ladirinia but really, wait til 5pm Pacific tomorrow to open your PR! then you can get credit!

@earlduque earlduque assigned earlduque and Ladirinia and unassigned earlduque Sep 29, 2023
@Ladirinia
Copy link
Contributor

Thank you!! :) And thanks for sharing your knowledge!

@SapphicFire SapphicFire linked a pull request Sep 30, 2023 that will close this issue
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 a pull request may close this issue.

2 participants