 
     callGraphSnapshotAPI query, start, end
     .then (json) ->
-      res.send json.snapshot_url
+      suffix = if config.useSlack then '#png' else ''
+      res.send json.snapshot_url + suffix
     .catch (e) ->
       res.robot.logger.error e
       res.send 'hubot-datadog-graph: error'

# Configuration:
#   HUBOT_DATADOG_GRAPH_API_KEY
#   HUBOT_DATADOG_GRAPH_APPLICATION_KEY
#
# Commands:
#   hubot datadog graph <graph> - take a graph snapshot using the Datadog API

config = parseConfig 'datadog-graph',
  apiKey: null
  applicationKey: null
  useSlack: false

module.exports = (robot) ->
  basePattern = 'd(?:ata)?d(?:og)?\\s+(?:graph|s(?:nap)?s(?:hot)?)\\s+'
