Skip to content
This repository has been archived by the owner on Mar 16, 2022. It is now read-only.

fix(karma) check if user exists before granting karma #4

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

thgaskell
Copy link
Contributor

Makes use of the robot.brain.userForName method to check if a user exists in slack before attempting to grant karma.

Note: It doesn't look like this will return application users (bruddahbot 😢).

I needed to revert some changes from the last commit because there were a few CoffeScript syntax errors.

Also added back the token expression type and renamed the hasAtSymbol to isMentioned on the token expression.

Copy link
Member

@bmatcuk bmatcuk left a comment

Choose a reason for hiding this comment

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

In the past, people have granted karma to "things", not just other users... and sometimes people use real names instead of usernames. I'm not sure I like restricting to just users. Thoughts?

scripts/karma.coffee Outdated Show resolved Hide resolved
scripts/karma.coffee Show resolved Hide resolved
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants