diff --git a/src/flowdock.coffee b/src/flowdock.coffee index bb8ca2d..1f35ecb 100644 --- a/src/flowdock.coffee +++ b/src/flowdock.coffee @@ -105,6 +105,7 @@ class Flowdock extends Adapter @stream.on 'connected', => @robot.logger.info('Flowdock: connected and streaming') @robot.logger.info('Flowdock: listening to flows:', (flow.name for flow in @joinedFlows()).join(', ')) + @emit 'connected' @stream.on 'clientError', (error) => @robot.logger.error('Flowdock: client error:', error) @stream.on 'disconnected', => @robot.logger.info('Flowdock: disconnected') @stream.on 'reconnecting', => @robot.logger.info('Flowdock: reconnecting') @@ -176,8 +177,6 @@ class Flowdock extends Adapter @fetchFlowsAndConnect() - @emit 'connected' - fetchFlowsAndConnect: -> @bot.flows (err, flows, res) => return if err?