message: Add identity to facebook bots
diff: @@ -359,6 +359,14 @@ function Facebookbot(configuration) {
  };
  + facebook_botkit.middleware.spawn.use(function(worker, next) {
  +
  + // copy the identity that we get when the app initially boots up
  + // into the specific bot instance
  + worker.identity = controller.identity;
  +
  + });
  +
  // universal normalizing steps
  // handle normal messages from users (text, stickers, files, etc count!)
  facebook_botkit.middleware.normalize.use(function normalizeMessage(bot, message, next) {
  @@ -449,6 +457,17 @@ function Facebookbot(configuration) {
  webserver.use(abortOnValidationError);
  }
  + facebook_botkit.getInstanceInfo().then(function(instance) {
  +
  + controller.identity = instance.identity;
  +
  + }).catch(function(err) {
  +
  + console.error('Could not load bot identity!');
  + throw new Error(err);
  +
  + });
  +
  });
  var messenger_profile_api = {
  