# How to change the max length for direct messages via the flag button

**URL:** <https://meta.discourse.org/t/how-to-change-the-max-length-for-direct-messages-via-the-flag-button/63888>\
**Category:** Feature\
**Created:** [2017年六月3日 18:03 UTC](https://meta.discourse.org/t/how-to-change-the-max-length-for-direct-messages-via-the-flag-button/63888 "2017-06-03T18:03:21Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![tophee](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tophee/32/73406_2.png) [@tophee](https://meta.discourse.org/u/tophee)\
**Post date:** [2017年六月3日 18:03 UTC](https://meta.discourse.org/t/how-to-change-the-max-length-for-direct-messages-via-the-flag-button/63888/1 "2017-06-03T18:03:21Z")

</div>

The default maximum number of characters for direct messages via the flag button seems to be 500 characters. I’d like to increase that a bit but can’t find the setting for it… Where should I look? If if doesn’t exist, please treat this as a “feature” request.

---

<div class="post-metadata">

**Author:** ![elijah](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/elijah/32/104055_2.png) [@elijah](https://meta.discourse.org/u/elijah)\
**Post date:** [2017年六月6日 20:03 UTC](https://meta.discourse.org/t/how-to-change-the-max-length-for-direct-messages-via-the-flag-button/63888/2 "2017-06-06T20:03:44Z")

</div>

The 500 appears to be set here:

[https://github.com/discourse/discourse/blob/master/app/assets/javascripts/discourse/models/post-action-type.js.es6](https://github.com/discourse/discourse/blob/master/app/assets/javascripts/discourse/models/post-action-type.js.es6)

It does not look like it is designed to be configurable.

---

<div class="post-metadata">

**Author:** ![adamengst](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/adamengst/32/116607_2.png) [@adamengst](https://meta.discourse.org/u/adamengst)\
**Post date:** [2018年七月27日 18:30 UTC](https://meta.discourse.org/t/how-to-change-the-max-length-for-direct-messages-via-the-flag-button/63888/3 "2018-07-27T18:30:58Z")

</div>

Has there been any movement on this? I keep running into the 500 character max length when using the flag button to plink users about their behavior.

---

<div class="post-metadata">

**Author:** ![riking](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/riking/32/170938_2.png) [@riking](https://meta.discourse.org/u/riking)\
**Post date:** [2018年七月27日 18:35 UTC](https://meta.discourse.org/t/how-to-change-the-max-length-for-direct-messages-via-the-flag-button/63888/4 "2018-07-27T18:35:20Z")

</div>

The workaround is to click on the avatar to open up the user card, and click Message from there.

---

<div class="post-metadata">

**Author:** ![tophee](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tophee/32/73406_2.png) [@tophee](https://meta.discourse.org/u/tophee)\
**Post date:** [2018年七月27日 18:58 UTC](https://meta.discourse.org/t/how-to-change-the-max-length-for-direct-messages-via-the-flag-button/63888/5 "2018-07-27T18:58:04Z")

</div>

Or if you want to message to be linked to the post (“You messaged this user” or whatever it says), you can also:

1. compose the meddsge in full length
2. then copy it to the clipboard and
3. delete all but the first paragraph or so (less than 500 characters)
4. submit the message
5. immediately navigate to the message in your messages
6. Edit it within the grace editing period by pasting in the full length message.

---

<div class="post-metadata">

**Author:** ![adamengst](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/adamengst/32/116607_2.png) [@adamengst](https://meta.discourse.org/u/adamengst)\
**Post date:** [2018年七月30日 15:43 UTC](https://meta.discourse.org/t/how-to-change-the-max-length-for-direct-messages-via-the-flag-button/63888/6 "2018-07-30T15:43:14Z")

</div>

Thanks for the workarounds, folks. It’s great that they exist, but the mere fact of their existence would seem to suggest that it would be welcome if this setting was configurable, perhaps separately for users and admins.

---

<div class="post-metadata">

**Author:** ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)\
**Post date:** [2018年七月30日 23:21 UTC](https://meta.discourse.org/t/how-to-change-the-max-length-for-direct-messages-via-the-flag-button/63888/7 "2018-07-30T23:21:19Z")

</div>

We generally rate by number and intensity of requests, and this one is currently at.. background radiation levels. 🌞

---

<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:** [2018年七月30日 23:37 UTC](https://meta.discourse.org/t/how-to-change-the-max-length-for-direct-messages-via-the-flag-button/63888/8 "2018-07-30T23:37:48Z")

</div>

Maybe its PR welcome? If I were a first time contributor looking to get a first PR together i’d be salivating at an easy win like this.

---

<div class="post-metadata">

**Author:** ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)\
**Post date:** [2018年七月30日 23:40 UTC](https://meta.discourse.org/t/how-to-change-the-max-length-for-direct-messages-via-the-flag-button/63888/9 "2018-07-30T23:40:22Z")

</div>

It’s a bit of a can of worms cause next you want preview as well…

---

<div class="post-metadata">

**Author:** ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)\
**Post date:** [2018年七月30日 23:54 UTC](https://meta.discourse.org/t/how-to-change-the-max-length-for-direct-messages-via-the-flag-button/63888/10 "2018-07-30T23:54:45Z")

</div>

This is a “turn my car into a truck” type of request. It _shouldn’t_ be honored, and if it was, that would indicate the project was mismanaged and therefore doomed.

---

<div class="post-metadata">

**Author:** ![tophee](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tophee/32/73406_2.png) [@tophee](https://meta.discourse.org/u/tophee)\
**Post date:** [2018年七月31日 00:49 UTC](https://meta.discourse.org/t/how-to-change-the-max-length-for-direct-messages-via-the-flag-button/63888/11 "2018-07-31T00:49:30Z")

</div>

> [@codinghorror](#):
>
> This is a “turn my car into a truck” type of request

I don’t get this analogy at all. Could you explain? How does modifying the max number of characters in flag messages turn discourse into something else?

> [@sam](#):
>
> It’s a bit of a can of worms cause next you want preview as well…

That’s a bit unfair. Nobody said anything about preview.

---

<div class="post-metadata">

**Author:** ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)\
**Post date:** [2018年七月31日 00:54 UTC](https://meta.discourse.org/t/how-to-change-the-max-length-for-direct-messages-via-the-flag-button/63888/12 "2018-07-31T00:54:13Z")

</div>

> [@tophee](#):
>
> That’s a bit unfair. Nobody said anything about preview.

The longer the message your are typing **the more likely** it is that you want preview, and a full composer and so on. It’s just the way it works.

Honestly, I am far more enthused by a “switch to full composer” button vs fiddling with the limits … and I am not #pr-welcome on that quite yet.

---

<div class="post-metadata">

**Author:** ![tophee](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tophee/32/73406_2.png) [@tophee](https://meta.discourse.org/u/tophee)\
**Post date:** [2018年七月31日 01:04 UTC](https://meta.discourse.org/t/how-to-change-the-max-length-for-direct-messages-via-the-flag-button/63888/13 "2018-07-31T01:04:44Z")

</div>

> [@sam](#):
>
> a “switch to full composer” button vs fiddling with the limits

I think that would indeed be a very good solution. So if such a button would be easy to implement, does that mean that the only reason why there is a special flag-button-message-editor is to be able to limit the number of characters?

---

<div class="post-metadata">

**Author:** ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)\
**Post date:** [2018年七月31日 01:17 UTC](https://meta.discourse.org/t/how-to-change-the-max-length-for-direct-messages-via-the-flag-button/63888/14 "2018-07-31T01:17:35Z")

</div>

> [@tophee](#):
>
> I don’t get this analogy at all. Could you explain?

See [Listen to Your Community, But Don’t Let Them Tell You What to Do](https://blog.codinghorror.com/listen-to-your-community-but-dont-let-them-tell-you-what-to-do/)

---

<div class="post-metadata">

**Author:** ![tophee](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tophee/32/73406_2.png) [@tophee](https://meta.discourse.org/u/tophee)\
**Post date:** [2018年七月31日 01:32 UTC](https://meta.discourse.org/t/how-to-change-the-max-length-for-direct-messages-via-the-flag-button/63888/15 "2018-07-31T01:32:24Z")

</div>

Okay, then I’d say: this feature request is definitely the electric windows, not the truck.

---

<div class="post-metadata">

**Author:** ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)\
**Post date:** [2018年七月31日 01:39 UTC](https://meta.discourse.org/t/how-to-change-the-max-length-for-direct-messages-via-the-flag-button/63888/16 "2018-07-31T01:39:28Z")

</div>

> [@sam](#):
>
> The longer the message your are typing **the more likely** it is that you want preview, and a full composer and so on. It’s just the way it works.

See above ↑ ↑ ↑

The whole point of the form is to keep it simple and use a short, succinct summary .. not write War and Peace that nobody’s gonna read.

Plus if you _want_ to write War and Peace to someone, exactly nobody is stopping you from doing so – you can initiate a personal message in about 5 different other ways.

---

<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:** [2018年七月31日 04:42 UTC](https://meta.discourse.org/t/how-to-change-the-max-length-for-direct-messages-via-the-flag-button/63888/17 "2018-07-31T04:42:20Z")

</div>

I wrote a plugin that does this, as it’s bugged me before too:  
[https://github.com/gdpelican/customize\_flag\_length](https://github.com/gdpelican/customize_flag_length)

---

<div class="post-metadata">

**Author:** ![adamengst](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/adamengst/32/116607_2.png) [@adamengst](https://meta.discourse.org/u/adamengst)\
**Post date:** [2018年七月31日 14:17 UTC](https://meta.discourse.org/t/how-to-change-the-max-length-for-direct-messages-via-the-flag-button/63888/18 "2018-07-31T14:17:30Z")

</div>

To be clear, I don’t really care all that much about this—the lack of the setting and the reliance on the workarounds simply feel at odds with nearly everything else I’ve experienced with Discourse, which is otherwise delightfully customizable.

Plus, having one message composer be constrained with a hard-coded limit and another unconstrained feels less efficient than having a single abstracted composer. Not that I know anything about how the code works under the hood, of course, and code that’s written is always more efficient than code that’s not written. 🙂

> [@sam](#):
>
> Honestly, I am far more enthused by a “switch to full composer” button vs fiddling with the limits

That would also address the issue, and in a more discoverable way than a setting.

---

<div class="post-metadata">

**Author:** ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)\
**Post date:** [2018年七月31日 23:14 UTC](https://meta.discourse.org/t/how-to-change-the-max-length-for-direct-messages-via-the-flag-button/63888/19 "2018-07-31T23:14:48Z")

</div>


