I’m currently implementing this feature and so far I merge the content of all the posts and set the content of the last reply with that content, setting the others as deleted.
Example:
Post 1:
This is the first post
Post 2:
This is the second post
Post 3:
This is the third post
After the merge, Post 1 and Post 2 are set as deleted and Post 3 has the following content:
This is the first post
This is the second post
This is the third post
Does anyone have other suggestions about the way the merge is done? And what about when the posts are replies to other posts, how should we build the merged post in a way that shows that information?