# Discourse Retort

**URL:** https://meta.discourse.org/t/discourse-retort/35903
**Category:** Plugin
**Tags:** end-of-life
**Created:** [22.Ноябрь.2015 11:53:58 UTC](https://meta.discourse.org/t/discourse-retort/35903 "2015-11-22T11:53:58Z")
**Posts on this page:** 20
**Page:** 5

<div class="post-metadata">

### Author: ![gdpelican](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gdpelican/32/81308_2.png) [@gdpelican](https://meta.discourse.org/u/gdpelican)
#### Post date: [11.Июль.2016 19:34:12 UTC](https://meta.discourse.org/t/discourse-retort/35903/85 "2016-07-11T19:34:12Z")

</div>

I’ve just updated this to account for the es6 changes outlined here:

> [@Now in master: ES6 Modules + Text Rendering](https://meta.discourse.org/t/now-in-master-es6-modules-text-rendering/46815):
>
> Approximately 2 years ago we [started down the long path to ES6 modules](https://meta.discourse.org/t/future-thoughts-discourses-javascript-ember-app/16715). For a long time, I’d spent 30 minutes a day working on converting files, which eventually got replaced with my strategy of converting a file every time I had to open it. Over time we got most of the way there, but with one big holdout: our text rendering engine. It was in standard ES5 modules because we used the same text rendering code on the server and client side of Discourse, and the server side didn’t have a way to par…

---

<div class="post-metadata">

### Author: ![frictionel](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/frictionel/32/299701_2.png) [@frictionel](https://meta.discourse.org/u/frictionel)
#### Post date: [29.Июль.2016 23:55:23 UTC](https://meta.discourse.org/t/discourse-retort/35903/86 "2016-07-29T23:55:23Z")

</div>

Is it normal that after activating the retort plugin the retort-emojis are preselected in the posts emoji-popup?

---

<div class="post-metadata">

### Author: ![gdpelican](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gdpelican/32/81308_2.png) [@gdpelican](https://meta.discourse.org/u/gdpelican)
#### Post date: [30.Июль.2016 02:28:04 UTC](https://meta.discourse.org/t/discourse-retort/35903/87 "2016-07-30T02:28:04Z")

</div>

Nah, that’s a bug. Feel free to file an issue at [Issues · gdpelican/retort · GitHub](http://github.com/gdpelican/retort/issues) and I’ll take care of it soon.

---

<div class="post-metadata">

### Author: ![Pad\_Pors](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pad_pors/32/52016_2.png) [@Pad\_Pors](https://meta.discourse.org/u/Pad_Pors)
#### Post date: [04.Сентябрь.2016 12:51:22 UTC](https://meta.discourse.org/t/discourse-retort/35903/88 "2016-09-04T12:51:22Z")

</div>

three simple things:

1. the pop up
2. a user can add as much as emoji as he wants, and it’s not limited to an emoji per user.
3. I can put emoji even on my own post.

---

<div class="post-metadata">

### Author: ![gdpelican](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gdpelican/32/81308_2.png) [@gdpelican](https://meta.discourse.org/u/gdpelican)
#### Post date: [04.Сентябрь.2016 15:53:08 UTC](https://meta.discourse.org/t/discourse-retort/35903/89 "2016-09-04T15:53:08Z")

</div>

> [@Pad\_Pors](#):
>
> 1. the pop up

??

> [@Pad\_Pors](#):
>
> 1. a user can add as much as emoji as he wants, and it’s not limited to an emoji per user.

This is available by setting ‘retort allow multiple reactions’ to false.

> [@Pad\_Pors](#):
>
> 1. I can put emoji even on my own post.

That’s the intended behaviour. Why do you think you shouldn’t be able to?

---

<div class="post-metadata">

### Author: ![Pad\_Pors](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pad_pors/32/52016_2.png) [@Pad\_Pors](https://meta.discourse.org/u/Pad_Pors)
#### Post date: [04.Сентябрь.2016 16:02:12 UTC](https://meta.discourse.org/t/discourse-retort/35903/90 "2016-09-04T16:02:12Z")

</div>

thanks, I missed that setting.

by pop up , i mean when i click on the emoji sets, a pop up raises. does it need to be like this?

about the self-emoji, i just thought emoji can be something like a “like” button, but with more functionality. and since it’s not usual to like your own post, i didn’t expect to be able to put emojis on my own posts.

plus the fact that I can put emojis on my own post using the text editor itself.

---

<div class="post-metadata">

### Author: ![ivanrlio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ivanrlio/32/48497_2.png) [@ivanrlio](https://meta.discourse.org/u/ivanrlio)
#### Post date: [05.Сентябрь.2016 16:39:21 UTC](https://meta.discourse.org/t/discourse-retort/35903/91 "2016-09-05T16:39:21Z")

</div>

Is anyone here on tests passed (v1.7.0.beta3 +56) and is crashing with Retort enabled?

I’m getting `Uncaught TypeError: Cannot read property 'exists' of undefined`, such that none of the posts in a thread are showing.

The error for this is:

 ![](https://global.discourse-cdn.com/meta/original/3X/5/b/5b142c6e8ad8e6538c2938bbb1ddb3b82fdf6384.jpg)

which is located in `/emoji/emoji-groups/` of the plugin.

I also receive another error,

![](https://global.discourse-cdn.com/meta/original/3X/b/3/b304203e0f5b9266dae6f89f1884ed5ee693ebfb.jpg)

So it looks like somehow `Discourse.xyz` is undefined, and somehow my version of Retort is messing with it.

Anyone have any ideas?

---

<div class="post-metadata">

### Author: ![gdpelican](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gdpelican/32/81308_2.png) [@gdpelican](https://meta.discourse.org/u/gdpelican)
#### Post date: [05.Сентябрь.2016 17:45:57 UTC](https://meta.discourse.org/t/discourse-retort/35903/92 "2016-09-05T17:45:57Z")

</div>

Appears to be related to removing a bunch of Discourse constants for es6 compatibility, referenced [here](https://meta.discourse.org/t/deprecating-es6-compatibility-layer/35821/1).

Also, neither of those bits of code appear to be in the master branch of the plugin, and retort appears to work fine on the latest Discourse (I just upgraded [discourse-babble.com](http://discourse-babble.com), which is also running retort, to latest), so I’m not sure how to help here.

That first line in particular looks mighty suspicious; Discourse master branch has this:

```plaintext
import { emojiExists } from 'pretty-text/emoji';

// scrub groups
groups.forEach(group => {
  group.icons = group.icons.reject(obj => !emojiExists(obj));
});

```

---

<div class="post-metadata">

### Author: ![ivanrlio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ivanrlio/32/48497_2.png) [@ivanrlio](https://meta.discourse.org/u/ivanrlio)
#### Post date: [05.Сентябрь.2016 18:01:57 UTC](https://meta.discourse.org/t/discourse-retort/35903/93 "2016-09-05T18:01:57Z")

</div>

Hi @gdpelican.

Thanks for getting back to this so soon.

I should have clarified we forked Retort and have been modifying it. Going to take a look at your revisions (commit: update Discourse for es6 modules) on the master branch and make adjustments accordingly to our version to see if remedies the errors.

---

<div class="post-metadata">

### Author: ![cpradio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cpradio/32/4970_2.png) [@cpradio](https://meta.discourse.org/u/cpradio)
#### Post date: [05.Сентябрь.2016 21:45:00 UTC](https://meta.discourse.org/t/discourse-retort/35903/94 "2016-09-05T21:45:00Z")

</div>

Also, might be a good idea to see if you need a fork anymore. I think you forked it so you could limit which emojis can be used in retort, that is now built in, but I might be thinking of someone else…

---

<div class="post-metadata">

### Author: ![ivanrlio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ivanrlio/32/48497_2.png) [@ivanrlio](https://meta.discourse.org/u/ivanrlio)
#### Post date: [05.Сентябрь.2016 21:53:33 UTC](https://meta.discourse.org/t/discourse-retort/35903/95 "2016-09-05T21:53:33Z")

</div>

Hi @cpradio.

I’m actually just about to test to what the original Retort looks like on our dev site . You are right though, we forked so we could limit the number of emojis to try and be more Facebook-esque.

 ![](https://global.discourse-cdn.com/meta/original/3X/3/3/33956257df2a1b74b0b04156bc9d84835b241dc4.jpg)

---

<div class="post-metadata">

### Author: ![ivanrlio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ivanrlio/32/48497_2.png) [@ivanrlio](https://meta.discourse.org/u/ivanrlio)
#### Post date: [05.Сентябрь.2016 22:33:16 UTC](https://meta.discourse.org/t/discourse-retort/35903/96 "2016-09-05T22:33:16Z")

</div>

Thanks for the heads up about Retort now incorporating the ability to select which emojis to display! It has the added benefit of proper architecture, and none of my spaghetti code.

 ![](https://global.discourse-cdn.com/meta/original/3X/4/3/43db5e12c76c8630873d5e2e31db99c6d7edaebd.jpg)

---

<div class="post-metadata">

### Author: ![meglio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/meglio/32/71444_2.png) [@meglio](https://meta.discourse.org/u/meglio)
#### Post date: [01.Октябрь.2016 09:38:26 UTC](https://meta.discourse.org/t/discourse-retort/35903/97 "2016-10-01T09:38:26Z")

</div>

Can this plugin be configured to only affect a particular category?  
Ideally, being able to switch it on/off per each category individually in its settings dialog.

---

<div class="post-metadata">

### Author: ![gdpelican](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gdpelican/32/81308_2.png) [@gdpelican](https://meta.discourse.org/u/gdpelican)
#### Post date: [02.Октябрь.2016 17:00:15 UTC](https://meta.discourse.org/t/discourse-retort/35903/98 "2016-10-02T17:00:15Z")

</div>

Not currently, but it’s possible to dev this out. I’ve raised an issue on the retort repo to track the request for this functionality.  
[https://github.com/gdpelican/retort/issues/22](https://github.com/gdpelican/retort/issues/22)

---

<div class="post-metadata">

### Author: ![Overgrow](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/overgrow/32/478189_2.png) [@Overgrow](https://meta.discourse.org/u/Overgrow)
#### Post date: [29.Октябрь.2016 19:39:13 UTC](https://meta.discourse.org/t/discourse-retort/35903/99 "2016-10-29T19:39:13Z")

</div>

Hello, first of all thank you for this great idea and plugin.

I’m getting this error on my dev instance with version` v1.7.0.beta5 +98`.

`Uncaught TypeError: Cannot read property 'icons' of undefined`

No emojis to choose from are shown - only faded screen and no popup.

 ![](https://global.discourse-cdn.com/meta/original/3X/6/e/6ea3392395ef23c3ff9b4d0efdb51035f1defd78.png)

My plugin settings:

 ![](https://global.discourse-cdn.com/meta/original/3X/f/8/f8af24ad5b0afe0f2317f1b03a1d50658da1d277.png)

Looking at the code seems like your plugin added one more emoji group and it was messed somehow that the pointer for `groups` is now -1…

 ![](https://global.discourse-cdn.com/meta/original/3X/3/6/36dcd8dcc382099520beb1a62d99867447b7640c.png)

Wouldn’t it be worth to not allow negative index @zogstrip ? Similar issue was fixed here: [Clicking Emoji button results in faded screen and no selector pop-up](https://meta.discourse.org/t/clicking-emoji-button-results-in-faded-screen-and-no-selector-pop-up/23689)

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [29.Октябрь.2016 21:19:44 UTC](https://meta.discourse.org/t/discourse-retort/35903/100 "2016-10-29T21:19:44Z")

</div>

I think you wanted to mention @gdpelican who is the author of that plugin rather than me 😉

---

<div class="post-metadata">

### Author: ![Overgrow](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/overgrow/32/478189_2.png) [@Overgrow](https://meta.discourse.org/u/Overgrow)
#### Post date: [30.Октябрь.2016 15:02:32 UTC](https://meta.discourse.org/t/discourse-retort/35903/101 "2016-10-30T15:02:32Z")

</div>

Sorry if you think this is inappropriate. I was referring to you just because there was similar problem in the past and I think that in this case it would be worthwhile to assure and sanity check `page` value in the core Discourse function (Independently of other plugins that may arrive in future). And you was doing that change previously…

---

<div class="post-metadata">

### Author: ![daath](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/daath/32/115536_2.png) [@daath](https://meta.discourse.org/u/daath)
#### Post date: [13.Ноябрь.2016 03:58:26 UTC](https://meta.discourse.org/t/discourse-retort/35903/102 "2016-11-13T03:58:26Z")

</div>

I can’t get this plugin to work, @gdpelican - It installs fine on the latest Discourse, but clicking the smiley just dims the background (scrolling is still possible) and nothing shows up. It also seems to be pulling something from discourse-meta-s3 amazon?! I just checked with Firebug and it looks like it throws an error: TypeError: r.register is undefined

---

<div class="post-metadata">

### Author: ![gdpelican](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gdpelican/32/81308_2.png) [@gdpelican](https://meta.discourse.org/u/gdpelican)
#### Post date: [13.Ноябрь.2016 04:10:38 UTC](https://meta.discourse.org/t/discourse-retort/35903/103 "2016-11-13T04:10:38Z")

</div>

There’s been a recent change to the emoji selector, give me a few and I’ll  
fix it.

---

<div class="post-metadata">

### Author: ![gdpelican](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gdpelican/32/81308_2.png) [@gdpelican](https://meta.discourse.org/u/gdpelican)
#### Post date: [13.Ноябрь.2016 17:41:37 UTC](https://meta.discourse.org/t/discourse-retort/35903/104 "2016-11-13T17:41:37Z")

</div>

Okay, I fixed the thing in the latest. ☀

[Предыдущая страница](https://meta.discourse.org/t/discourse-retort/35903.md?page=4)

[Следующая страница](https://meta.discourse.org/t/discourse-retort/35903.md?page=6)
