title: Best practice for friend-adding system with Firebase?
body: <p>I'm trying to think of the best way to structure a database to allow users to send/accept/decline users as friends.</p>
  
  <p>I've currently got a system that allows users to search through users, checks all the necessary stuff like people already being on their list bhalbhla, but I don't know how to finish it off with actually sending the invites.</p>
  
  <p>My structure looks like:</p>
  
  <pre><code>Users
     290384239843
        friends:
            093824098209384: true
        username: Bob
  Usernames
        Bob: 290384239843
  </code></pre>
  
  <p>I figure when I hit the add button, it sends something to both users on Firebase, and I think the two options are:</p>
  
  <pre><code>users
    29038493
      friends
         0283940839024: pending
  </code></pre>
  
  <p>or </p>
  
  <pre><code>users 
    02938409384
      friends
         3094809384903 : true
      pendingFriends: 
         0283940839024: true
  </code></pre>
  
  <p>I think both could potentially work, but I figured I'd reach out incase I could get some guidance from someone with more experience with this. Maybe there's a better way entirely different? </p>