Change 'Slack' back to 'HipChat' in multicore and server.

This commit is contained in:
dillon 2015-10-30 15:26:18 -07:00
parent 493d302a0d
commit b5d92d5c26
4 changed files with 6 additions and 6 deletions

View file

@ -79,7 +79,7 @@ if cluster.isMaster
hipchat = require './server/hipchat' hipchat = require './server/hipchat'
hipchat.sendHipChatMessage(message, ['tower'], {papertrail: true}) hipchat.sendHipChatMessage(message, ['tower'], {papertrail: true})
catch error 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() cluster.fork()
else else
require('coffee-script') require('coffee-script')

View file

@ -13,10 +13,10 @@ module.exports.sendHipChatMessage = sendHipChatMessage = (message, rooms, option
options ?= {} options ?= {}
for room in rooms for room in rooms
unless roomID = roomIDMap[room] unless roomID = roomIDMap[room]
log.error "Unknown Slack room #{room}." log.error "Unknown HipChat room #{room}."
continue continue
unless key = config.hipchat[room] unless key = config.hipchat[room]
log.info "No Slack API key for room #{room}." log.info "No HipChat API key for room #{room}."
continue continue
form = form =
color: options.color or 'yellow' 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}" url = "https://api.hipchat.com/v2/room/#{roomID}/notification?auth_token=#{key}"
request.post {uri: url, json: form}, (err, res, body) -> 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 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

View file

@ -383,6 +383,6 @@ PaymentHandler = class PaymentHandler extends Handler
message += " for #{options.payment.get('description')}" if options.payment?.get('description') message += " for #{options.payment.get('description')}" if options.payment?.get('description')
hipchat.sendHipChatMessage message, ['tower'] hipchat.sendHipChatMessage message, ['tower']
catch e 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() module.exports = new PaymentHandler()

View file

@ -192,7 +192,7 @@ class SubscriptionHandler extends Handler
msg = "Year subscription purchased by #{req.user.get('email')} #{req.user.id}" msg = "Year subscription purchased by #{req.user.get('email')} #{req.user.id}"
hipchat.sendHipChatMessage msg, ['tower'] hipchat.sendHipChatMessage msg, ['tower']
catch error 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) @sendSuccess(res, user)
subscribeWithPrepaidCode: (req, res) -> subscribeWithPrepaidCode: (req, res) ->