   dispatch UNSET_MESSAGE_EDIT_MODE, { messageId }
 
 
-fetchEmbedData = (url) ->
+fetchEmbedPayload = (messageData, callback = kd.noop) ->
+
+  url = embedlyHelpers.extractUrl messageData.body
+  return callback()  unless url
+  return callback()  if messageData.payload?.link_url is url
 
   options = {
     maxWidth  : 530

    channelId, clientRequestId, body
  }

  embedlyUrl = embedlyHelpers.extractUrl body
  if embedlyUrl
    embedlyPromise = fetchEmbedData embedlyUrl
  else
    embedlyPromise = Promise.resolve()

  embedlyPromise.nodeify (err, result) ->

    if err
      kd.log 'Embed.ly error!', err
    else if result
      data    = result.first
      payload = embedlyHelpers.createMessagePayload data

    socialapi.message.post { channelId, clientRequestId, body, payload }, (err, message) ->
      if err


  { fetchDataFromEmbedly } = kd.singletons.socialapi.message

  fetchDataFromEmbedly url, options, (err, result) ->

    if err
      kd.log 'Embed.ly error!', err
    else if result
      data    = result.first
      payload = embedlyHelpers.createMessagePayload data

    callback payload


module.exports = {
