flutter_firebase_chat_core
flutter_firebase_chat_core copied to clipboard
About Message Deletion
Hello,
Is there a way to delete the messaging history from a user? If User A should be able to see the messages, even if user B deletes them.
Hello! By default I thought that delete will remove the message from both users, so you basically delete a document from the Firebase. If you want a behaviour you described above, I think you will need to use metadata map available on the message, and when user B deletes a message he updates its metadata to isDeleted: userId for example, and you filter out these messages in the stream using logged in user ID, and for user A they will still be visible, because he will have different user ID. Something like that.
Hello, Thank you for your help. I will try it.