Retort - a reaction-style plugin for Discourse

With Retort, it’s flexible. One person can post multiple reactions to a post. And since it is separate, you can “like” independently.

With the new Discourse-Reactions plugin, one account may only react in a single way at all. You can’t even “like” and also mark another reaction. If you use another, it replaces the “like” (or whatever other initial reaction was marked)

EDIT: if you are asking about the choices for which emoji are available, I think Retort has option to be limited or to allow anything, and maybe the new Discourse-Reactions requires specifying a limited set?

3 Likes

I’ve written a migration script and created an admin UI to migrate retorts to reactions. It’s on this branch. The UI looks like this

I need some advice to finish it off.

It’s possible that a user could have both liked and “retorted” on a post. In the migration, I’m going to preference retorts over likes in this scenario. However the ReactionManager.toggle! access protections do not allow this.

Would it be possible to add a “force” option for migrations? Or could you suggest another approach? I could attempt a manual handling, however Discourse Reactions has some interesting stuff going on with “shadow likes” which I’m not entirely sure I understand fully.

Considering you’re not thinking of adding the ability to have multiple reactions on a post, if a user has multiple retorts I’ll preference the user’s first retort.

Also in light of that, I’ll maintain this plugin as is for the foreseeable future, as that’s a substantive difference. The migration will still be useful to a plurality of users I think though.

10 Likes

Although we won’t transfer for this reason, I imagine some people might appreciate our specific example use case for multiple reactions:

At https://community.snowdrift.coop we specifically changed “like” to “appreciate” (editing the text throughout). Appreciation indicates less agreement and more acknowledgement that a post added value. Most cases where people marked retorts, they also “appreciated” the post. The “appreciation” is more high-level and is a “thank you for posting this” and used more often than people might otherwise “like” something. The Retorts are then used to express specific feelings and reactions.

This has felt so good within our community (which is still small as we’re not fully a launched platform still, but it may grow much bigger after we finally get launched). It really feels missing everywhere else. I have felt encouraged to “like” posts that I feel have value elsewhere at least, it’s the right direction. I previously felt hesitant to “like” a post that I didn’t agree with.

Just thought this perspective might be appreciated by other Retort users considering whether to migrate etc.

6 Likes

I think users are more sophisticated. They know ‘Like’ can have several connotations and there will be different reasons why someone likes a post.

On a general vanilla Discourse, experienced users at least will surely use Like as an indication of appreciation on a regular basis and also interpret that it can mean only that.

I personally don’t think it needs to be that explicit nor distinguished but if you disagree, this is definitely the plugin to resolve that, notwithstanding other use cases and the obvious fun of it :+1:

3 Likes

Well, my point was that “like” can indeed be treated as “appreciate” as we made more explicit — but that means there’s significant value in marking that separately from other reactions. So Retort is indeed the way to go in order to have both like/appreciate and other reactions.

For adapting “like” to “appreciate”, we used the New like icon component and did the text editing. Although I think that’s valuable, my point was just that this makes more explicit one existing-anyway reason that multiple reactions should be valued.

4 Likes

I see your point more clearly now. Yes :sweat_smile: :+1:

1 Like

Members at Maker Forums definitely appreciate the ability to have multiple emoji reactions. We would be very sad to lose that in a migration if retort were to become unmaintained.

3 Likes

Retort will continue to be maintained by Pavilion.

@Ahmed_Gagan Any thoughts on the below?

5 Likes

For a retort reaction at priority you can use

SiteSetting.post_undo_action_window_mins =max allowed minutes


ReactionManager.new(first_retort_reaction_at_priority, by_user, Guardian.new(by_user), post).toggle!

This will handle everything, it will remove like if the user have already liked the post and add a reaction.

1 Like

Yup, I could do that. It would be a bit of a hack though :wink:

I’m not sure I could assume that workaround would remain viable over time. It’s also a bit risky. For example, if I just run that code the user’s post_undo_action_window_mins site setting would remained changed. You could change it back at the end of the migration, but doing setting changes like this on the fly to get around a guardian is not ideal.

Ideally what I’m after here is a slight change to the ReactionManager interface to make it possible to reliably migrate retorts to reactions. Currently it’s only set up to handle requests from the client.

One way to do that would be to

  • abstract the guardian in toggle! to an ensure_can_toggle method
  • make the ensure_can_toggle method subject to a force option

This is the approach typically taken to handle migrations or backend imports in other parts of Discourse (if you do a search in app/ or lib/ for force you’ll see a few examples).

Does that make sense?

2 Likes

I think we don’t need to use the setting here, As we are not touching the likes which are already created on the post. this means we are creating new reactions to post. in this case guardian.can_delete_reaction_user? will always be true. Just using ReactionManager.toggle will be enough for this purpose IMO.

1 Like

Discourse does a lot with Likes such as limiting number of Likes by trust level and giving people badges based on Likes.

Does adding a reaction also add to the Likes count for both users and topics?

1 Like

You coud ask separately about how this interacts with the new official Discourse Reactions - Beyond Likes plugin

But Retort (which allows multiple reactions per post per user, unlike the Discourse Reactions plugin) does not interact at all with the Likes-related trust levels and badges.

5 Likes

@gdpelican this is a repost from Reaction emoji seem to have no verification as it seems the reaction is not part of discourse I repost it here:

I think I have discovered a bug but I don’t have a proper reproduction, but I can easily show examples of the issue, and I think my theory might be right.

Here is the issue, you are able to add non existent emoji to the post reactions. it results in :whateverYouWant: reactions in posts.

You can see example of it on the Manjaro forum, where I noticed a specific user posts often have these non existent emojis. After asking him a few questions I concluded he’s using some kind of automatic translation extension in his browser, and that probably translates the emojis :code: to his language. Unfortunately I didn’t have a reply from this user to know exactly his setup on his browser. To back my theory, you can see when he quoted someone in the following thread linked, he had translation of the original message in his quote.

See this message/thread on Manjaro forum:

See an example in the reactions, you see the issue clearly with all the proper reactions next to the invalid one:

So it seems that a user can send non existent emojis through the process of no verification of the emoji code.

1 Like