         when 'member_join'
           content.text = data.user.screen_name
 
-      sendAsSlackAttachment(content)
+      robot.emit 'esa.slack.attachment', (content)
 
     robot.on 'esa.hear.stats', (res, stats) ->
       content = buildContent 'The stats of esa'

        fallback: ''
        thumb_url: 'https://img.esa.io/uploads/production/pictures/105/6161/image/425c3b1e777d356c34973e818543420e.gif'

    sendAsSlackAttachment = (content, channel) ->
      channel ?= options.default_room
      robot.emit 'esa.debug', "emit slack.attachment with\n#{content}"


        item.short = true
        item

      robot.emit 'esa.slack.attachment', content, res.envelope.room

    robot.on 'esa.hear.post', (res, post) ->
      content = buildContent ''
      content.title = post.full_name
      content.title_link = post.url
      content.text = post.body_md
      robot.emit 'esa.slack.attachment', content, res.envelope.room

    robot.on 'esa.hear.comment', (res, comment, post) ->
      content = buildContent ''
