Closed manohar-techahead closed 11 months ago
Hi @manohar-techahead This is Vladimir from QuickBlox.
Please specify what type of dialog you are using? It's not clear from your description.
If you are using a private dialog, then this is absolutely expected behavior. Private conversations are not deleted from the server. You can even think of them in such a way that between all users in the system there have always been, are and will be private dialogues on the server.
And if the user deletes his private dialogue and then "creates" it again, he will receive the same dialogue from the server, which has the "last message" either from himself or from his opponent. And by the way, when a user deletes a private dialog, this does not mean that the opponent should delete it too (Depends on the application logic)
If you don't want to display the "last message" in this case, then you need to handle this case depending on the application idea.
For example, when you delete a private conversation and recreate it, you can send a "notification" message to it (for example, chatMessage.customParameters["notification_type" = "back_to_private_dialog") and save it on the server (for example, chatMessage .customParameters["save_to_history" ] = true) with a welcome text like: "Bob has joined the chat", and then this message will become the "last message". " and it will be displayed in the list of dialogues:
and on the chat screen there will be something like this
Best regards, Vladimir
If a dialog is deleted and then next time chat with a user is initiated, new dialog still shows last message in dialog listing whereas in detailed chat it does not show that message![Simulator Screen Shot - iPhone 14 Pro Max - 2023-08-24 at 15 54 11](https://github.com/QuickBlox/quickblox-ios-sdk/assets/142577466/645d820e-a54a-40b4-ad0a-61210f5b059c)