Skip to content

Commit

Permalink
shift around the done handling
Browse files Browse the repository at this point in the history
  • Loading branch information
atmos committed Dec 24, 2011
1 parent 366c0c4 commit 0e69b33
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 8 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
v2.1.1
======
* The hwhoops release, finish/done behavior is handled elsewhere

v2.1.0
======
* Introduce Response.finish() to indicate that a message should not be
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "hubot",
"version": "2.1.0",
"version": "2.1.1",
"author": "hubot",
"keywords": "github hubot campfire bot",
"description": "A simple helpful Robot for your Company",
Expand Down
11 changes: 5 additions & 6 deletions src/robot.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,10 @@ class Robot
# Returns nothing.
receive: (message) ->
for listener in @listeners
unless message.done
try
listener.call message
catch ex
@logger.error "Unable to call the listener: #{ex}"
try
listener.call message
catch ex
@logger.error "Unable to call the listener: #{ex}"


# Public: Loads every script in the given path.
Expand Down Expand Up @@ -302,7 +301,7 @@ class Listener
# Returns nothing.
call: (message) ->
if match = @matcher message
@callback new @robot.Response(@robot, message, match)
@callback new @robot.Response(@robot, message, match) unless message.done

class TextListener extends Listener
# TextListeners receive every message from the chat source and decide if they want
Expand Down
2 changes: 1 addition & 1 deletion src/templates/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
},

"dependencies": {
"hubot": "2.1.0",
"hubot": "2.1.1",
"hubot-scripts": "2.0.2",
"optparse": "1.0.3"
}
Expand Down

0 comments on commit 0e69b33

Please sign in to comment.