   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


  { fetchDataFromEmbedly } = kd.singletons.socialapi.message

  fetchDataFromEmbedly url, options


module.exports = {


  dispatch EDIT_MESSAGE_BEGIN, { messageId, body, payload }

  fetchEmbedPayload { body, payload }, (embedPayload) ->
    payload = _.assign {}, payload, embedPayload

    socialapi.message.edit {id: messageId, body, payload}, (err, message) ->
      if err
        dispatch EDIT_MESSAGE_FAIL, { err, messageId }
        return

      realtimeActionCreators.bindMessageEvents message
      dispatch EDIT_MESSAGE_SUCCESS, { message, messageId }


###*
