Skip to content

Commit

Permalink
Fix triggers with defined channels
Browse files Browse the repository at this point in the history
  • Loading branch information
rodrigok committed Dec 23, 2015
1 parent bfa7d3f commit 009c8ea
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/rocketchat-integrations/server/triggers.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,11 @@ ExecuteTriggers = (message, room) ->

triggersToExecute = []

if triggers[room._id]?
triggersToExecute.push trigger for key, trigger of triggers[room._id]
if triggers['#'+room._id]?
triggersToExecute.push trigger for key, trigger of triggers['#'+room._id]

if triggers[room.name]?
triggersToExecute.push trigger for key, trigger of triggers[room.name]
if triggers['#'+room.name]?
triggersToExecute.push trigger for key, trigger of triggers['#'+room.name]

if triggers.__any?
triggersToExecute.push trigger for key, trigger of triggers.__any
Expand Down

0 comments on commit 009c8ea

Please sign in to comment.