Skip to content
This repository was archived by the owner on Jun 8, 2023. It is now read-only.

Commit 982a5e2

Browse files
author
codemanufacture
committed
working-on.coffee Hubot response is always whats? Who's that?
1 parent 5a59e2a commit 982a5e2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/scripts/working-on.coffee

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
module.exports = (robot) ->
1818

19-
robot.respond /(what\'s|what is|whats) @?([\w .\-]+) working on(\?)?$/i, (msg) ->
19+
robot.respond /(?:what\'s|what is|whats) @?([\w .\-]+) working on(?:\?)?$/i, (msg) ->
2020
name = msg.match[1].trim()
2121

2222
if name is "you"
@@ -47,12 +47,12 @@ module.exports = (robot) ->
4747
else
4848
msg.send "#{name}? Who's that?"
4949

50-
robot.respond /(i\'m|i am|im) working on (.*)/i, (msg) ->
50+
robot.respond /(?:i\'m|i am|im) working on (.*)/i, (msg) ->
5151
name = msg.message.user.name
5252
user = robot.brain.userForName name
5353

5454
if typeof user is 'object'
55-
user.workingon = msg.match[2]
55+
user.workingon = msg.match[1]
5656
msg.send "Okay #{user.name}, got it."
5757
else if typeof user.length > 1
5858
msg.send "I found #{user.length} people named #{name}"

0 commit comments

Comments
 (0)