i am developing a simple chat app using firebase, in which till now user authentication, creating friend list, sending and receiving msg functionalities are done. now i have added a menu item in conversation activity called as "Delete conversation" , obviously which will clear the conversation msgs.
Now let me tell you the database structure for msg stored in firebase database.
> messages
> <ConversationId>
> <MsgId>
> text:"hello"
> timestamp:<timestamp>
> sender:<sender's uid>
> receiver:<receiver's uid>
> <MsgId>
> ....
So, my question is, The conversation includes minimum 2 users. right. so , suppose i implement a delete conversation to delete all the entries in a particular conversation id. it will delete all the data under that conversation id. but suppose delete conversation is clicked by only user1... user2 wants all that conversation. then how can i implement it? do i need to create a local database? to store and sync all the messages in users phone?