# Quick Messages Plugin

**URL:** https://meta.discourse.org/t/quick-messages-plugin/39188
**Category:** Plugin
**Tags:** broken
**Created:** [February 8, 2016, 12:13am UTC](https://meta.discourse.org/t/quick-messages-plugin/39188 "2016-02-08T00:13:55Z")
**Posts on this page:** 20
**Page:** 13

<div class="post-metadata">

### Author: ![angus](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/angus/32/341715_2.png) [@angus](https://meta.discourse.org/u/angus)
#### Post date: [July 24, 2017, 5:38am UTC](https://meta.discourse.org/t/quick-messages-plugin/39188/244 "2017-07-24T05:38:09Z")

</div>

Looks like there’s a snazzy new emoji selector 🙂

I’ve updated quick messages to support the new emoji selector. Update to the latest, and it will work again.

[https://github.com/angusmcleod/discourse-quick-messages/commit/e8072fea9a6a7e1074d0db00648af0a4a36c0112](https://github.com/angusmcleod/discourse-quick-messages/commit/e8072fea9a6a7e1074d0db00648af0a4a36c0112)

I have fixed the selector in the center of the screen to deal with the scenario of when there are multiple composers open at the same time. Ideally the selector would appear next to the composer it is associated with (i.e. from which the user clicked the emoji button). However the new selector logic assumes there is only one composer open on the screen, so I’ll have to modify that logic directly to handle this issue, and right now I don’t have the time. The fixed positioning will suffice for now.

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

---

<div class="post-metadata">

### Author: ![Pawel\_Kosiorek](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pawel_kosiorek/32/75785_2.png) [@Pawel\_Kosiorek](https://meta.discourse.org/u/Pawel_Kosiorek)
#### Post date: [July 25, 2017, 12:55pm UTC](https://meta.discourse.org/t/quick-messages-plugin/39188/245 "2017-07-25T12:55:41Z")

</div>

Hi!  
After activation of QM Plugin performance on my forum drastically dropped…  
My Discourse is installed on quite good VM  
`4 vCores x 2.3 GHz / 15 GB RAM / 100 GB SSD RAID Local`  
But still after activation of QM when few peoples are typing, all CPU’s are 100% and forum starts get really slow…  
Do you know what need to be fixed/adjusted to get rid of that performance issues?  
Thanks!

---

<div class="post-metadata">

### Author: ![Aman\_Jagga](https://avatars.discourse-cdn.com/v4/letter/a/ac8455/32.png) [@Aman\_Jagga](https://meta.discourse.org/u/Aman_Jagga)
#### Post date: [July 25, 2017, 1:56pm UTC](https://meta.discourse.org/t/quick-messages-plugin/39188/246 "2017-07-25T13:56:31Z")

</div>

Thanks for the quick fix. It is working perfectly now

---

<div class="post-metadata">

### Author: ![angus](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/angus/32/341715_2.png) [@angus](https://meta.discourse.org/u/angus)
#### Post date: [July 25, 2017, 2:00pm UTC](https://meta.discourse.org/t/quick-messages-plugin/39188/247 "2017-07-25T14:00:23Z")

</div>

> [@Pawel\_Kosiorek](#):
>
> After activation of QM Plugin performance on my forum drastically dropped…
> 
> My Discourse is installed on quite good VM
> 
> 4 vCores x 2.3 GHz / 15 GB RAM / 100 GB SSD RAID Local
> 
> But still after activation of QM when few peoples are typing, all CPU’s are 100% and forum starts get really slow…

Yes, there are definitely optimizations that can be made here.

Keep in mind that this plugin is effectively a different front-end for the same topic-based pm system that Discourse has. I’m not surprised that it may not perform well if you are carrying on multiple conversations at once. This is not a separate pm system.

The benefit of using the same PM system as Discourse is that it allows you to switch between normal Discourse PMs and quick messages. It is not a separate chat system. If you’re after a chat system try [Babble](https://meta.discourse.org/t/babble-a-chat-plugin/31753).

Every time you make a message it sends it to the server like a normal post, going through all the same processes a normal post goes through, but with a significantly simpler UI.

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

But it has a cost..

 ![](https://global.discourse-cdn.com/meta/original/3X/2/c/2cb0810bf0492c7a75084ae8df83ec41b8599f15.png)

So, the question is where to start when optimizing this.

From my relatively un-trained perspective, here is how I think of the possibilities:

- slimming down the client. Easier. I can do this and will do some.
- slimming down the server. Harder. Also something I can attempt, but the result won’t be amazing.
- batching on the client (probably not wise)
- batching on the server (probably the best place to tackle the problem, but someone more familiar with ruby and rails should do this)

The next question is how we go about executing on one of these approaches. As mentioned, I can probably get some performance gains, but I’m hardly the most technically savvy person around here.

It depends how much it matters to you. Optimizing the performance of quickly posting PMs is not a simple problem, as you’re dealing with functionality that is core to Discourse itself.

Someone like @gdpelican or @joebuhlig could probably get significant performance improvements for a fee.

---

<div class="post-metadata">

### Author: ![joebuhlig](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/joebuhlig/32/193054_2.png) [@joebuhlig](https://meta.discourse.org/u/joebuhlig)
#### Post date: [July 26, 2017, 2:06am UTC](https://meta.discourse.org/t/quick-messages-plugin/39188/248 "2017-07-26T02:06:09Z")

</div>

Sidekiq is your friend. 😉

My first go at this would likely be to instantly post the message to the sending users UI and create a background job via sidekiq to create the real message that populates for other users. That way the load is handled by a single client and distributes the load on the server a bit more. Yes, there may be a lag between posts but I wouldn’t expect it to be more than a few seconds at most and would likely go unnoticed.

---

<div class="post-metadata">

### Author: ![Ham](https://avatars.discourse-cdn.com/v4/letter/h/ecb155/32.png) [@Ham](https://meta.discourse.org/u/Ham)
#### Post date: [August 10, 2017, 10:26am UTC](https://meta.discourse.org/t/quick-messages-plugin/39188/249 "2017-08-10T10:26:03Z")

</div>

Im having a problem with this plugin now. To recreate I have two messages open. I respond to message A. then I respond to message B. The user on Message A replies back. That text is now in the box as me typing to Message B. When I close the box it asks if I was discard the message so it is active.

This is the third time this is occurring to me.

---

<div class="post-metadata">

### Author: ![tobiaseigen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tobiaseigen/32/539204_2.png) [@tobiaseigen](https://meta.discourse.org/u/tobiaseigen)
#### Post date: [August 23, 2017, 10:33pm UTC](https://meta.discourse.org/t/quick-messages-plugin/39188/250 "2017-08-23T22:33:05Z")

</div>

I think this is expected behavior. In discourse, you can’t have more than one message or post going at a time.

---

<div class="post-metadata">

### Author: ![angus](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/angus/32/341715_2.png) [@angus](https://meta.discourse.org/u/angus)
#### Post date: [August 25, 2017, 2:07am UTC](https://meta.discourse.org/t/quick-messages-plugin/39188/251 "2017-08-25T02:07:09Z")

</div>

This plugin can be seen in action in my [new sandbox](https://discourse.angusmcleod.com.au/).

---

<div class="post-metadata">

### Author: ![SMT](https://avatars.discourse-cdn.com/v4/letter/s/dec6dc/32.png) [@SMT](https://meta.discourse.org/u/SMT)
#### Post date: [September 8, 2017, 3:34pm UTC](https://meta.discourse.org/t/quick-messages-plugin/39188/252 "2017-09-08T15:34:23Z")

</div>

My Main menu gets hidden if I receive the message. Here is the console error.

```
TypeError: Cannot create property 'className' on number '1'
at i (_vendor-057c8aaf728aa3bc264d5ff93a70e003efe4f4ecdc16ba0a02d452e6e3ef4402.js:19687)
at i (_vendor-057c8aaf728aa3bc264d5ff93a70e003efe4f4ecdc16ba0a02d452e6e3ef4402.js:19527)
at t.html (_application-223b038256358c50f3c1cd8d4ed0e8484a9137cd8862a2e348d7fbe358d5b575.js:48539)
at t.p [as draw] (_application-223b038256358c50f3c1cd8d4ed0e8484a9137cd8862a2e348d7fbe358d5b575.js:52743)
at t.value (_application-223b038256358c50f3c1cd8d4ed0e8484a9137cd8862a2e348d7fbe358d5b575.js:52887)
at r (_vendor-057c8aaf728aa3bc264d5ff93a70e003efe4f4ecdc16ba0a02d452e6e3ef4402.js:19723)
at i (_vendor-057c8aaf728aa3bc264d5ff93a70e003efe4f4ecdc16ba0a02d452e6e3ef4402.js:19710)
at i (_vendor-057c8aaf728aa3bc264d5ff93a70e003efe4f4ecdc16ba0a02d452e6e3ef4402.js:19079)
at i (_vendor-057c8aaf728aa3bc264d5ff93a70e003efe4f4ecdc16ba0a02d452e6e3ef4402.js:19102)
at i (_vendor-057c8aaf728aa3bc264d5ff93a70e003efe4f4ecdc16ba0a02d452e6e3ef4402.js:19102)

```

---

<div class="post-metadata">

### Author: ![verganna](https://avatars.discourse-cdn.com/v4/letter/v/df705f/32.png) [@verganna](https://meta.discourse.org/u/verganna)
#### Post date: [September 9, 2017, 12:01pm UTC](https://meta.discourse.org/t/quick-messages-plugin/39188/253 "2017-09-09T12:01:23Z")

</div>

Thank you[.](http://mr-ginseng.com/cannelle/) I will try this to see by myself[.](http://mr-ginseng.com/curcuma/) 😀

---

<div class="post-metadata">

### Author: ![angus](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/angus/32/341715_2.png) [@angus](https://meta.discourse.org/u/angus)
#### Post date: [September 10, 2017, 3:52am UTC](https://meta.discourse.org/t/quick-messages-plugin/39188/254 "2017-09-10T03:52:05Z")

</div>

> [@SMT](#):
>
> My Main menu gets hidden if I receive the message. Here is the console error.

Thanks for reporting this. Fixed.

[https://github.com/angusmcleod/discourse-quick-messages/commit/4b7a249c801c5ac066b34b5ff7688157bc1b92c0](https://github.com/angusmcleod/discourse-quick-messages/commit/4b7a249c801c5ac066b34b5ff7688157bc1b92c0)

---

<div class="post-metadata">

### Author: ![exetico](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/exetico/32/119962_2.png) [@exetico](https://meta.discourse.org/u/exetico)
#### Post date: [September 10, 2017, 4:42pm UTC](https://meta.discourse.org/t/quick-messages-plugin/39188/255 "2017-09-10T16:42:03Z")

</div>

Hi. Are you aware of this issue in Chrome?

 ![image](https://global.discourse-cdn.com/meta/original/3X/9/5/958621c7e34af6240f730bab71c750510ae864fe.png)  
The input-textfield keeps extending, but i’m typing “out of the window”, so basically i can’t see what i’m writing after line 4 in the screenshot.

---

<div class="post-metadata">

### Author: ![angus](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/angus/32/341715_2.png) [@angus](https://meta.discourse.org/u/angus)
#### Post date: [September 11, 2017, 3:58am UTC](https://meta.discourse.org/t/quick-messages-plugin/39188/256 "2017-09-11T03:58:20Z")

</div>

Thanks. Will fix this this arvo.

---

<div class="post-metadata">

### Author: ![angus](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/angus/32/341715_2.png) [@angus](https://meta.discourse.org/u/angus)
#### Post date: [September 11, 2017, 5:01am UTC](https://meta.discourse.org/t/quick-messages-plugin/39188/257 "2017-09-11T05:01:53Z")

</div>

Fixed.  
[https://github.com/angusmcleod/discourse-quick-messages/commit/3ae0795de9f23e3e278fe8445723c2563f40e820](https://github.com/angusmcleod/discourse-quick-messages/commit/3ae0795de9f23e3e278fe8445723c2563f40e820)

 ![48 PM](https://global.discourse-cdn.com/meta/original/3X/b/1/b17ac91b20760513ddc141e0e021b2ad13b11d20.png)

---

<div class="post-metadata">

### Author: ![exetico](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/exetico/32/119962_2.png) [@exetico](https://meta.discourse.org/u/exetico)
#### Post date: [September 11, 2017, 2:17pm UTC](https://meta.discourse.org/t/quick-messages-plugin/39188/258 "2017-09-11T14:17:04Z")

</div>

Awesome - and fast job! Thanks 🙂

Do you prefer issues/suggestions/improvements mentioned here, or raised at GitHub?

 ![image](https://global.discourse-cdn.com/meta/original/3X/8/b/8b9cb1aa73f4ec29f0dbd905d02a4568a28c4f2d.png)  
I’m thinking of the possibilities to listen/use the colors from the selected theme, rather than fixed colors if it’s even possible?(assets/stylesheets/quick.scss) I have not look into this kind of solution before.

---

<div class="post-metadata">

### Author: ![exetico](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/exetico/32/119962_2.png) [@exetico](https://meta.discourse.org/u/exetico)
#### Post date: [September 30, 2017, 11:18am UTC](https://meta.discourse.org/t/quick-messages-plugin/39188/259 "2017-09-30T11:18:01Z")

</div>

Hi again, @angus.

Any news regarding the theme-colors? As i know, it’s pretty easy to follow the main color-values, for a nice result.

I’m also wonder if it’s possible to add a “Open PM”-button to the quick-message window, making it possible to open up the PM in the normal view. Will you be able to make this? 🙂

As always, i really appreciate your help and plugins 🙂

---

<div class="post-metadata">

### Author: ![angus](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/angus/32/341715_2.png) [@angus](https://meta.discourse.org/u/angus)
#### Post date: [September 30, 2017, 11:53am UTC](https://meta.discourse.org/t/quick-messages-plugin/39188/260 "2017-09-30T11:53:28Z")

</div>

I missed that one entirely! Sorry. If I take longer than a couple of days to respond it probably means I missed it somehow.

Done.

 ![35 PM](https://global.discourse-cdn.com/meta/original/3X/d/7/d730c9a76dff63d7fe1542a7f36ce73d623281d1.jpg) ![21 PM](https://global.discourse-cdn.com/meta/original/3X/4/f/4f10059ae67769ced9dfb9db5fb0c17ad1151ac7.png)

[https://github.com/angusmcleod/discourse-quick-messages/commit/e8a3180e02f261eb288ba81f0439356baf5ed224](https://github.com/angusmcleod/discourse-quick-messages/commit/e8a3180e02f261eb288ba81f0439356baf5ed224)

---

<div class="post-metadata">

### Author: ![exetico](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/exetico/32/119962_2.png) [@exetico](https://meta.discourse.org/u/exetico)
#### Post date: [September 30, 2017, 12:30pm UTC](https://meta.discourse.org/t/quick-messages-plugin/39188/261 "2017-09-30T12:30:11Z")

</div>

No problem! 🙂 Thanks!  
What about:

> [@exetico](#):
>
> I’m also wonder if it’s possible to add a “Open PM”-button to the quick-message window, making it possible to open up the PM in the normal view. Will you be able to make this? 🙂

---

<div class="post-metadata">

### Author: ![angus](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/angus/32/341715_2.png) [@angus](https://meta.discourse.org/u/angus)
#### Post date: [September 30, 2017, 1:13pm UTC](https://meta.discourse.org/t/quick-messages-plugin/39188/262 "2017-09-30T13:13:09Z")

</div>

Sure. A button with text on it like that won’t fit, but an icon will. Added.

 ![Screenshot at Sep 30 21-12-42](https://global.discourse-cdn.com/meta/original/3X/e/0/e0d4668366b71b75d51433240a813d016e25fa89.jpg)

[https://github.com/angusmcleod/discourse-quick-messages/commit/23152504ae6d140155edf10d93e8bef27cf28ffa](https://github.com/angusmcleod/discourse-quick-messages/commit/23152504ae6d140155edf10d93e8bef27cf28ffa)

---

<div class="post-metadata">

### Author: ![JamesNorth](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jamesnorth/32/283740_2.png) [@JamesNorth](https://meta.discourse.org/u/JamesNorth)
#### Post date: [October 1, 2017, 12:33am UTC](https://meta.discourse.org/t/quick-messages-plugin/39188/263 "2017-10-01T00:33:54Z")

</div>

Thanks so much for this @angus - just getting around to installing it now.

Not only does it work really well, but it adds that envelope icon so that I can finally get to previous message history easily!

The thing I’m noticing at the moment is that the uploading indicator (from a forum post **elsewhere** ) is ending up in the message window. It actually posts the text from that post in there and you have to cancel the uploading waiting bar thing.

![53 am](https://global.discourse-cdn.com/meta/original/3X/2/5/25cac7c8d768e7ba2ea15a793772037a77548475.png)

[Previous page](https://meta.discourse.org/t/quick-messages-plugin/39188.md?page=12)

[Next page](https://meta.discourse.org/t/quick-messages-plugin/39188.md?page=14)
