Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: add compatibility for Coffeescript 2 #528

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"devDependencies": {
"chai": "^3.5.0",
"coffee-coverage": "^2.0.0",
"coffeescript": "^1.12.7",
"coffeescript": "^2.3.1",
"codecov": "^2.3.1",
"hubot": "^2.19.0",
"istanbul": "^0.4.3",
Expand Down
2 changes: 1 addition & 1 deletion src/bot.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class SlackBot extends Adapter
# @param {Object} options.rtmStart - options for `rtm.start` Web API method
###
constructor: (@robot, @options) ->
super
super()
@robot.logger.info "hubot-slack adapter v#{pkg.version}"
@client = new SlackClient @options, @robot

Expand Down
15 changes: 10 additions & 5 deletions src/message.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ class ReactionMessage extends Message
# custom integration (not part of a Slack app with a bot user), then this value will be undefined.
# @param {string} event_ts - A String of the reaction event timestamp.
###
constructor: (@type, @user, @reaction, @item_user, @item, @event_ts) ->
super @user
constructor: (@type, user, @reaction, @item_user, @item, @event_ts) ->
super user
@user = user
@type = @type.replace("reaction_", "")

class PresenceMessage extends Message
Expand Down Expand Up @@ -66,7 +67,13 @@ class SlackTextMessage extends TextMessage
# @param {string} robot_name - The Slack username for this robot
# @param {string} robot_alias - The alias for this robot
###
constructor: (@user, @text, rawText, @rawMessage, channel_id, robot_name, robot_alias) ->
constructor: (user, text, rawText, rawMessage, channel_id, robot_name, robot_alias) ->
super user, text, rawMessage.ts

@user = user
@text = text
@rawMessage = rawMessage

# private instance properties
@_channel_id = channel_id
@_robot_name = robot_name
Expand All @@ -77,8 +84,6 @@ class SlackTextMessage extends TextMessage
@thread_ts = @rawMessage.thread_ts if @rawMessage.thread_ts?
@mentions = []

super @user, @text, @rawMessage.ts

###*
# Build the text property, a flat string representation of the contents of this message.
#
Expand Down