getPushContent()

in lambda/Message_Archiver/archiver/lib/pinpoint.js [266:278]


  getPushContent(push) {
    if (!push) return [];
    return Object.keys(push)
      .filter(key => key.Body)
      .reduce((total, key) => {
        return [
          ...total,
          {pieceType: 'BODY', html: push.Body, defaultSubs: push.DefaultSubstitutions, channel: 'PUSH'},
          {pieceType: 'RAWCONTENT', html: push.RawContent, defaultSubs: push.DefaultSubstitutions, channel: 'PUSH'},
          {pieceType: 'TITLE', html: push.Title, defaultSubs: push.DefaultSubstitutions, channel: 'PUSH'}
        ];
      }, []);
  }