I have a Firestore Array that has typing users (as IDs) in it. My goal is to remove the current User from that chat when the app terminates. I have read this thread where Frank van Puffelen said that you can remove values on disconnect by using this code:
ref.child("Clients").child(user.uid).child("current_venue").onDisconnectRemoveValue()
My problem is that this code is only able to remove a child document from the database and not an array. Is there any way to call onDisconnectRemoveValue()
for a Firestore Array? Or is there any alternative for this case?
This is what my database structure looks like: Collection(Chats) -> Document(ChatID) -> Array(typingUsers)