title: FCM message payload errors, Nested object within data object errors out
body: <p>According to the react-native-fcm package you can include a custom nested object within the data object for a FCM messaging payload.</p>
  
  <p><a href="https://github.com/evollu/react-native-fcm/issues/46" rel="nofollow noreferrer">according to this post by the package author</a></p>
  
  <p>Like this:</p>
  
  <pre><code>var payload = {
      data: {
          custom_notification: {
              title: 'title',
              body: 'body',
              priority: 'high',
              id: 'id',
              group: 'group'
          }
      }
  };
  </code></pre>
  
  <p>This is for the purpose of receiving heads up notifications in all app states, which will not happen if you do just a notification payload or data payload.</p>
  
  <p>When I implement this in my cloud function I get the following error:</p>
  
  <pre><code>Error: Messaging payload contains an invalid value for the "data.custom_notification" property. Values must be strings.
  </code></pre>
  
  <p>So I'm at a loss as to how others can be using this successfully?</p>
  
  <p>I wonder if there's some issue going on with my environment or something as the following test payload which was given to me by firebase support (and is in the docs) errors out:</p>
  
  <pre><code>var payload = {
  "to":"FCM_TOKEN",
  "data": {
  "type":"MEASURE_CHANGE",
  "body": "test body",
  "title": "test title",
  "color":"#00ACD4",
  "priority":"high",
  "id": "id",
  "show_in_foreground": true
  }
  };
  </code></pre>
  
  <p>I get the following error:</p>
  
  <pre><code>Error sending message stringify: {"code":"messaging/invalid-payload","message":"Messaging payload contains an invalid \"to\" property. Valid properties are \"data\" and \"notification\"."}
  </code></pre>
  
  <p>Been at this for days so hopefully I can get a bit of help on this.</p>
  
  <p>Thanks in advance!</p>