Delete or Archive a message may affect the whole conversation
(The problem is related to the provided templates, not the code)
How to reproduce:
1) you display a folder (inbox) 'by message', 2) go to the view of a message, 3) ask for the delete, then if that message is involved in a conversation, it is the whole conversation that is marked as deleted, not the displayed message only.
This is also the case for the 'Archive' action.