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

Commit

Permalink
Use symbols as keys, not strings
Browse files Browse the repository at this point in the history
  • Loading branch information
ajaleelp committed Jan 28, 2016
1 parent 37a44d0 commit cfba261
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/lita/adapters/slack/message_handler.rb
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ def dispatch_message(user)
source.private_message! if channel && channel[0] == "D"
message = Message.new(robot, body, source)
message.command! if source.private_message?
message.extensions = { 'slack': { 'timestamp': data['ts'] } }
message.extensions[:slack] = { timestamp: data["ts"] }
log.debug("Dispatching message to Lita from #{user.id}.")
robot.receive(message)
end
Expand Down
2 changes: 1 addition & 1 deletion spec/lita/adapters/slack/message_handler_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@

it "saves the timestamp in extensions" do
subject.handle
expect(message.extensions["slack"]["timestamp"]).to eq("1234.5678")
expect(message.extensions[:slack][:timestamp]).to eq("1234.5678")
end

context "when the message is a direct message" do
Expand Down

0 comments on commit cfba261

Please sign in to comment.