Reputation: 1692
is there any way to update a field in a certain document when another document is updated!!
i have collection "Users" that hold users informations such as (Name, photoUrl...). and a collection "ChatsInfo" that hold the peer informations(Name, photoUrl...etc).
Alice is the user and Bob is the peer.
Alice has a document that contains Bob's information (Name, photoUrl...) stored in (Users/AliceDoc/ChatsInfo). now if Bob decided to update his profile pic which reside in a document inside Users collection. How do i make sure that Alice peer document which reside in a document in side ChatsInfo collection will get updated too!!
Upvotes: 0
Views: 82
Reputation: 317467
You can do with with a Firestore trigger running in Cloud Functions. I suggest looking into that. Please read from the documentation:
Upvotes: 1