mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-23 15:48:11 -05:00
Change 'Slack' back to 'HipChat' in multicore and server.
This commit is contained in:
parent
493d302a0d
commit
b5d92d5c26
4 changed files with 6 additions and 6 deletions
|
@ -79,7 +79,7 @@ if cluster.isMaster
|
|||
hipchat = require './server/hipchat'
|
||||
hipchat.sendHipChatMessage(message, ['tower'], {papertrail: true})
|
||||
catch error
|
||||
console.log "Couldn't send Slack message on server death:", error
|
||||
console.log "Couldn't send HipChat message on server death:", error
|
||||
cluster.fork()
|
||||
else
|
||||
require('coffee-script')
|
||||
|
|
|
@ -13,10 +13,10 @@ module.exports.sendHipChatMessage = sendHipChatMessage = (message, rooms, option
|
|||
options ?= {}
|
||||
for room in rooms
|
||||
unless roomID = roomIDMap[room]
|
||||
log.error "Unknown Slack room #{room}."
|
||||
log.error "Unknown HipChat room #{room}."
|
||||
continue
|
||||
unless key = config.hipchat[room]
|
||||
log.info "No Slack API key for room #{room}."
|
||||
log.info "No HipChat API key for room #{room}."
|
||||
continue
|
||||
form =
|
||||
color: options.color or 'yellow'
|
||||
|
@ -32,4 +32,4 @@ module.exports.sendHipChatMessage = sendHipChatMessage = (message, rooms, option
|
|||
url = "https://api.hipchat.com/v2/room/#{roomID}/notification?auth_token=#{key}"
|
||||
request.post {uri: url, json: form}, (err, res, body) ->
|
||||
return log.error 'Error sending Slack message:', err or body if err or /error/i.test body
|
||||
#log.info "Got Slack message response:", body
|
||||
#log.info "Got HipChat message response:", body
|
||||
|
|
|
@ -383,6 +383,6 @@ PaymentHandler = class PaymentHandler extends Handler
|
|||
message += " for #{options.payment.get('description')}" if options.payment?.get('description')
|
||||
hipchat.sendHipChatMessage message, ['tower']
|
||||
catch e
|
||||
log.error "Couldn't send Slack message on payment because of error: #{e}"
|
||||
log.error "Couldn't send HipChat message on payment because of error: #{e}"
|
||||
|
||||
module.exports = new PaymentHandler()
|
||||
|
|
|
@ -192,7 +192,7 @@ class SubscriptionHandler extends Handler
|
|||
msg = "Year subscription purchased by #{req.user.get('email')} #{req.user.id}"
|
||||
hipchat.sendHipChatMessage msg, ['tower']
|
||||
catch error
|
||||
@logSubscriptionError(req.user, "Year sub sale Slack tower msg error: #{JSON.stringify(error)}")
|
||||
@logSubscriptionError(req.user, "Year sub sale HipChat tower msg error: #{JSON.stringify(error)}")
|
||||
@sendSuccess(res, user)
|
||||
|
||||
subscribeWithPrepaidCode: (req, res) ->
|
||||
|
|
Loading…
Reference in a new issue