// Removing the `like` button
api.removePostMenuButton("like");
// And adding it again
api.decorateWidget("post-menu:before-extra-controls", (dec) => {
return dec.attach("discourse-reactions-actions", {
Instead of doing this
we should add a replacePostMenuButton method in core plugin api and use it in reactions plugin. In that case, we don’t need a separate logic for reaction button in post voting plugin.
Since there is a workaround, I will make this change after the upcoming release.