message: running: Add handover_protocol and get_secondary_receivers_list method
diff: @@ -760,13 +760,42 @@ function Facebookbot(configuration) {
  }
  };
  + var handover_protocol = {
  + get_secondary_receivers_list: function(fields, cb) {
  + var uri = 'https://' + api_host + '/v2.6/me/secondary_receivers?' + (fields ? 'fields=' + fields + '&' : '') + 'access_token=' + configuration.access_token;
  + request.get(uri,
  + function(err, res, body) {
  + if (err) {
  + facebook_botkit.log('Could not get secondary receivers list');
  + } else {
  +
  + var results = null;
  + try {
  + results = JSON.parse(body);
  + } catch (err) {
  + facebook_botkit.log('ERROR in secondary receivers list call: Could not parse JSON', err, body);
  + }
  +
  + if (results) {
  + if (results.error) {
  + facebook_botkit.log('ERROR in secondary receivers list: ', results.error.message);
  + } else {
  + facebook_botkit.debug('Successfully call page message tags', body);
  + cb(results);
  + }
  + }
  + }
  + });
  + }
  + };
  facebook_botkit.api = {
  'messenger_profile': messenger_profile_api,
  'thread_settings': messenger_profile_api,
  'attachment_upload': attachment_upload_api,
  'nlp': nlp,
  - 'tags': tags
  + 'tags': tags,
  + 'handover_protocol': handover_protocol
  };
  // Verifies the SHA1 signature of the raw request payload before bodyParser parses it
  