Save item with UID child


#1

Hi guys, I need help in my project, I’m trying to create a chat in Firebase, in my ts I pass someone parameters as citizen_id, lawyer_id, etc…
in my chat.ts I have

createMessage() {
    let user = {
      citizen_id: this.citizen.uid,
      lawyer_id: this.lawyer.key,
      message: this.message,
      created_at: this.created_at
    }
    this.chatService.createChat(user)
    console.log(user);
  }

so, I’ve send to chat.service like this

  createChat(user: any): Promise<any> {
      return firebase.database()
      .ref(`/chat/`)
      .child(user.citizen_id)
      .set(user); 
  }

I trying to create the objects with UID of users, but I don’t saving the next object 3ª and 4° …
when I try to save the object its to save in the same object 2ª UID as to show image
how to save the the subsequents itens ?