title: Can't send a message via custom store/dispatch in botframework-webchat for IE11/es5
body: <p>My customer requires IE11 support for our chatbot. I had to modify the webchat code not to use es6 features like arrow functions, as they are not supported in IE11/es5. For the most part I was successful, but the one thing I wasn't able to get working was sending a message event I am sending. The new code works in Chrome, but I am getting an <strong><em>Expected identifier</em></strong> error message in IE11. Here is the relevant code:</p>
  
  <pre class="lang-js prettyprint-override"><code>const store = window.WebChat.createStore({}, function({dispatch}) { return function(next) { return function(action) {
      if (action.type === 'WEB_CHAT/SEND_MESSAGE') {
          // Message sent by the user
          PageTitleNotification.Off();
          clearTimeout(interval);
      } else if (action.type === 'DIRECT_LINE/INCOMING_ACTIVITY' &amp;&amp; action.payload.activity.name !== "inactive") {
          // Message sent by the bot
          clearInterval(interval);
          interval = setTimeout(function() {
              // Change title to flash the page
              PageTitleNotification.On('Are you still there?');
  
              // Notify bot the user has been inactive
              dispatch({
                  type: 'WEB_CHAT/SEND_EVENT',
                  payload: {
                      name: 'inactive',
                      value: ''
                  }
              });
  
          }, 3000)
      }
      return next(action);
  }}});
  </code></pre>
  
  <p>Previously the first line looked like</p>
  
  <pre class="lang-js prettyprint-override"><code>const store = window.WebChat.createStore({}, ({ dispatch }) =&gt; next =&gt; action =&gt; {
  </code></pre>
  
  <p>The issue is coming at <code>function({dispatch})</code>. IE console is saying an identifier is expected and the entire webchat fails to load. It works fine in Chrome. If I change <code>function({dispatch})</code> to just <code>function(dispatch)</code>, the bot renders but the dispatch statement sending the inactive message to the bot (below) no longer functions in IE <em>OR</em> Chrome.</p>
  
  <pre class="lang-js prettyprint-override"><code>// Notify bot the user has been inactive
  dispatch({
      type: 'WEB_CHAT/SEND_EVENT',
      payload: {
          name: 'inactive',
          value: ''
      }
  });
  </code></pre>
  
  <p>Why is IE not recognizing <code>{dispatch}</code> as an identifier, and what can I do to get this working?</p>