# When merging posts, likes of the posts being merged do not add up to the final post

**URL:** <https://meta.discourse.org/t/when-merging-posts-likes-of-the-posts-being-merged-do-not-add-up-to-the-final-post/48918>\
**Category:** Bug\
**Created:** [August 20, 2016, 10:55am UTC](https://meta.discourse.org/t/when-merging-posts-likes-of-the-posts-being-merged-do-not-add-up-to-the-final-post/48918 "2016-08-20T10:55:38Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![saurabhp](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/saurabhp/32/125182_2.png) [@saurabhp](https://meta.discourse.org/u/saurabhp)\
**Post date:** [November 23, 2018, 9:05am UTC](https://meta.discourse.org/t/when-merging-posts-likes-of-the-posts-being-merged-do-not-add-up-to-the-final-post/48918/9 "2018-11-23T09:05:30Z")

</div>

Hi @codinghorror,  
I was looking through this bug. I found out when we do merge\_posts, we pseudo\_delete all posts except one which becomes the merged post.

So for all the posts except merged\_post, we delete their user\_actions for `was_liked`. So to transfer likes, I will have to get all the `was_liked` actions for deleted\_posts. Out of those likes, users which haven’t liked the merged\_post, we can create `user_action` for them corresponding to merged\_post.

What do you think about this approach?

Also, there is an option to recover post. When that happens, all `was_liked` actions are re-created too using `post_action`. In that case, the merged post will have new likes equal to likes to all the merged posts and recovered\_post will also get back its likes thus increasing number of likes.

Thanks

---

_[View the full topic](https://meta.discourse.org/t/when-merging-posts-likes-of-the-posts-being-merged-do-not-add-up-to-the-final-post/48918)._
