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

feat: add potato when reacting to message #8

Merged
merged 4 commits into from
Sep 6, 2022
Merged

Conversation

vladanpaunovic
Copy link
Contributor

@vladanpaunovic vladanpaunovic commented Sep 2, 2022

Closes #4

I couldn't find a way to test this. I am fairly confident that this works. 😄

So if anyone can test this before merging it would be a great help.

Copy link
Member

@tobias-wilfert tobias-wilfert left a comment

Choose a reason for hiding this comment

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

Looks good, will take some time for this to get in production though since we need to add the reaction_added scope to the bot which means that the app will need to be re authorised.

slack-service/app.js Outdated Show resolved Hide resolved
Co-authored-by: Tobias Wilfert <[email protected]>
@vladanpaunovic
Copy link
Contributor Author

Looks good, will take some time for this to get in production though since we need to add the reaction_added scope to the bot which means that the app will need to be re authorised.

True. It would be cool if someone can test this locally to make sure this works as expected as I coded it without any feedback.

@cleptric cleptric added this to the 2022.1 milestone Sep 4, 2022
@cleptric
Copy link
Member

cleptric commented Sep 4, 2022

@tobias-wilfert @vladanpaunovic I pushed some changes.

How they work
Adding a taco reaction will give any person mentioned in a message a taco. If nobody is mentioned in a message, then the message author will receive a taco.

I personally do not like how HeyTaco implemented their reaction feature in terms of UX, so right now, we only award a potato to the creator of the message instead of giving out potato to all people mentioned in the message. This is ofc up for debate.
The way I made this work is super hacky, but it was/is a hackweek project... 🥸

I also added blaming people if they are selfish and give potato to themselves 🙈

The remaining changes are housekeeping and the addition of lodash, to be able to compare if two arrays are equal.

Copy link
Member

@tobias-wilfert tobias-wilfert left a comment

Choose a reason for hiding this comment

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

Very nice work @cleptric and @vladanpaunovic

@cleptric cleptric merged commit 4efa525 into main Sep 6, 2022
@cleptric cleptric deleted the add-reaction-potato branch September 6, 2022 10:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

React to someone's message with a 🥔 to gib them one
3 participants