Skip to content

Commit

Permalink
fix default reactions order
Browse files Browse the repository at this point in the history
  • Loading branch information
Bartosz Kopiński committed Oct 29, 2013
1 parent a40a889 commit 932137e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/hipbot/matchable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ def react sender, room, body
end

def reactions
reactions_sets.flatten
reaction_sets.flatten
end

protected
Expand All @@ -17,8 +17,9 @@ def reactables
end

def reaction_sets
reactables.flat_map do |reactable|
[reactable.reactions, reactable.default_reactions]
reactables.each_with_object([]) do |reactable, array|
array.prepend(reactable.reactions)
array.append(reactable.default_reactions)
end
end

Expand Down

0 comments on commit 932137e

Please sign in to comment.