title: firebase realtime database, child_changed if user is part of conversation
body: <p>This is my database structure: 
  <a href="https://i.stack.imgur.com/rMHaS.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/rMHaS.png" alt="enter image description here"></a></p>
  
  <p>I want new messages to generate a notification.
  How do i query this data to ensure the member is part of the conversation and then pass just the child_added of the new message. </p>
  
  <p>This is what i have so far but it will return the entire conversation when a message is added.</p>
  
  <pre><code>const notificationChecker = database.ref("chats")
      .orderByChild(`members/${userId}`)
      .equalTo(true);
  
  notificationChecker.on('child_changed', snapshot =&gt; {
  
    console.log(snapshot.val());
  
  });
  </code></pre>