       if (errorCodeAvailable and error.code is'authMissing') or
       (status is 'parsererror' and M.isAuthorisationErrorPage responseText) or
       (M.isAuthorisationErrorResponse status)
-        @gettingStarted params ? {}
+        @gettingStarted params
       else
         getMessage = ->
           if errorCodeAvailable

        throw __msg 'errorNotWithinAConversation'
      id

    onSchedule: (props, loadingIcon, resetIcon) =>
      try
        messageId = @getMessageId()
      catch e
        @onScheduleError null, null, e.toString()
        return

      archive = !!props.archive

      loadingIcon?() unless archive

      data =
        msgId:  messageId
        when:    props.when
        markUnread:    !!props.unread
        starIt:    !!props.star
        onlyIfNoAnswer:  !!props.noanswer
        moveToInbox:    !!props.inbox
        archiveAfterScheduling:  archive

      # remove false values to transmit less data over the wire
      _.each data, (val, key) ->
        delete data[key] if val is false
        return

      log 'scheduling mail...', data


      $.ajax
        url:       @getServiceURL() + M.SCHEDULE_SUFFIX
        #type:     'POST'
        dataType:  'json'
        data:      data
        success:   (resp, textStatus, jqXHR) =>
          success = @onScheduleSuccess resp, data
          if success
            resetIcon?() unless archive
          return
        error:     (jqXHR, textStatus, errorThrown) =>
          @onScheduleError textStatus, data, errorThrown, jqXHR.responseText
          return

      if archive
        @activateArchiveButton()
      else
        _.delay (->
          resetIcon?()
          return
          ), 600
      return


    onScheduleSuccess: (data, params) =>
      log 'Scheduling success', data
      if data.success
        chrome.extension.sendMessage
          action:   'notification'
          icon:     "images/tie.svg"
          title:     __msg 'notificationScheduleSuccessTitle'
          message:   __msg 'notificationScheduleSuccess'
      else
        @onScheduleError data.error, params, data.error
      data.success

    createDialog: (title, okButton, cancelButton) ->
      dialog = new GMailUI.ModalDialog title

        pickerMenu.close()
        presetMenu.close()
        button.close()
        button.addClass M.CLS_LOADER
        props.when = wen
        (@onSchedule props).always ->
          button.removeClass M.CLS_LOADER
          return
        return

      isValid = =>
