text: 'use strict';
  
  const settings = require('./settings.js');
  
  exports.getFirstMessagingEntry = (body) => {
    const val = body.object == 'page' &&
      body.entry &&
      Array.isArray(body.entry) &&
      body.entry.length > 0 &&
      body.entry[0] &&
      body.entry[0].id == settings.FB_PAGE_ID &&
      body.entry[0].messaging &&
      Array.isArray(body.entry[0].messaging) &&
      body.entry[0].messaging.length > 0 &&
      body.entry[0].messaging[0]
    ;
    return val || null;
  };
  