# Forcing email context - input requested

**URL:** https://meta.discourse.org/t/forcing-email-context-input-requested/25577
**Category:** Feature
**Tags:** email
**Created:** [February 23, 2015, 6:08pm UTC](https://meta.discourse.org/t/forcing-email-context-input-requested/25577 "2015-02-23T18:08:13Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![lake54](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lake54/32/121955_2.png) [@lake54](https://meta.discourse.org/u/lake54)
#### Post date: [February 23, 2015, 6:08pm UTC](https://meta.discourse.org/t/forcing-email-context-input-requested/25577/1 "2015-02-23T18:08:13Z")

</div>

I’ve added the ability for users to enable the forcing of email context in their notifications and sent a pull request to Discourse, however it requires more discussion of the feature on meta, the reason for this post.

[https://github.com/discourse/discourse/pull/3222](https://github.com/discourse/discourse/pull/3222)

To answer @sam’s questions on the PR:

> I am pretty uneasy with this change, its a very confusing setting to be adding to users.

Personal opinion - I don’t think it’s confusing. The option is labelled “Always include previous posts in notifications” which to me explains the purpose of the setting. Would some clarification text of what happens if the option is unchecked suffice?

> also where do you stop? allow them to specify the amount of context? allow them to specify that context is included regardless of what was previously sent? allow them to specify if context goes before or after.

At the moment I just wanted to get the setting in there, but I’m not averse to extending it to a degree, like with the email digest. I could see this working as the same label, and if checked, a dropdown that offers some pre-defined settings (perhaps from 0 to the site configured context?). The site configured context option could then be reworded to imply a maximum amount of email context (which, to be honest, is what it already means currently).

As to where to stop, I don’t see a need to ‘stop’, that’s what software development is about, to me at least. We keep iterating over a feature to improve its use to users.

* * *

What are people’s thoughts and suggestions on this feature?

It’s my first time dabbling in Ruby, and first commit to the project, so I’d like to see it in there in some shape or form 😄

See also:

> [@Option to force email context](https://meta.discourse.org/t/option-to-force-email-context/22401):
>
> Some users on our forum would like the option to force an amount of context in the notification emails. I suggest this is implemented as a user-configurable option with a site default (shipped as 0). The current situation as I understand it is that context is included if the user hasn’t received that post in an email yet. Therefore, if they receive every email (mailing list mode), they’ll never get context. This can be confusing if they delete emails after they’ve read them, because there’s no…

---

<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: [February 23, 2015, 11:34pm UTC](https://meta.discourse.org/t/forcing-email-context-input-requested/25577/2 "2015-02-23T23:34:25Z")

</div>

@codinghorror what are your thoughts here?

---

<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: [February 24, 2015, 12:17am UTC](https://meta.discourse.org/t/forcing-email-context-input-requested/25577/3 "2015-02-24T00:17:47Z")

</div>

We do have at least one customer requesting this so I am inclined to accept.

I don’t really like that it is a per-user preference, adding to the cognitive load of all the other settings that users have to deal with.. but I suppose a site-wide default can never be correct either.

---

<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: [February 24, 2015, 1:12am UTC](https://meta.discourse.org/t/forcing-email-context-input-requested/25577/4 "2015-02-24T01:12:58Z")

</div>

What I struggle with is explaining to users what this does:

Does “Always include context” mean that context is always included regardless of it being sent to you in the past?

What does this setting even do if “context” is already set in site settings?

---

<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: [February 24, 2015, 1:18am UTC](https://meta.discourse.org/t/forcing-email-context-input-requested/25577/5 "2015-02-24T01:18:28Z")

</div>

> [@sam](#):
>
> “Always include context” mean that context is always included regardless of it being sent to you in the past?

Correct, yes. Always included up to the limit specified in the `email posts context` global site setting (which defaults to 5).

---

<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: [February 24, 2015, 1:21am UTC](https://meta.discourse.org/t/forcing-email-context-input-requested/25577/6 "2015-02-24T01:21:47Z")

</div>

The thing I find confusing as a users is

I have “always include context” off, but Discourse keeps sending me context, why?

I guess this works for me way better:

Email context: (dropdown) “Always|Auto|Never” (auto being default)

---

<div class="post-metadata">

### Author: ![chapel](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/chapel/32/122414_2.png) [@chapel](https://meta.discourse.org/u/chapel)
#### Post date: [February 24, 2015, 1:31am UTC](https://meta.discourse.org/t/forcing-email-context-input-requested/25577/7 "2015-02-24T01:31:35Z")

</div>

Is auto only show what you haven’t seen?

---

<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: [February 24, 2015, 1:32am UTC](https://meta.discourse.org/t/forcing-email-context-input-requested/25577/8 "2015-02-24T01:32:00Z")

</div>

Yes, which is how it works now.

---

<div class="post-metadata">

### Author: ![chapel](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/chapel/32/122414_2.png) [@chapel](https://meta.discourse.org/u/chapel)
#### Post date: [February 24, 2015, 1:36am UTC](https://meta.discourse.org/t/forcing-email-context-input-requested/25577/9 "2015-02-24T01:36:27Z")

</div>

Doesn’t seem to always behave that way. Including the one in the screenshot there are three previous replies and two are from me.

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

---

<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: [February 24, 2015, 1:39am UTC](https://meta.discourse.org/t/forcing-email-context-input-requested/25577/10 "2015-02-24T01:39:27Z")

</div>

See:

TopicUser

> <https://github.com/discourse/discourse/blob/main/app/models/topic_user.rb#L342>

We send you as context up to 5 posts that we did not email you before.

---

<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: [February 24, 2015, 3:09am UTC](https://meta.discourse.org/t/forcing-email-context-input-requested/25577/11 "2015-02-24T03:09:57Z")

</div>

What about “Always / Always (Inverted) / Auto / Auto (Inverted) / Never”?

Because there have been requests to put the context on the top, and as long as we’re experimenting, I want to try out the “context on top” (the “inverted” option).

If people like what I’ve called “inverted” (context on top), then go ahead and swap it to the default.

---

<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: [February 24, 2015, 3:11am UTC](https://meta.discourse.org/t/forcing-email-context-input-requested/25577/12 "2015-02-24T03:11:26Z")

</div>

I strongly oppose all this inversion talk. I like the drop down idea though.

---

<div class="post-metadata">

### Author: ![chapel](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/chapel/32/122414_2.png) [@chapel](https://meta.discourse.org/u/chapel)
#### Post date: [February 24, 2015, 4:11am UTC](https://meta.discourse.org/t/forcing-email-context-input-requested/25577/13 "2015-02-24T04:11:53Z")

</div>

I don’t have much opinion on the email context option here.

I do think it would be good to add one piece of context above the post that caused the email, that specifically would be the post it is a reply to.

So if the email notification is due to a reply, you should see the post in question immediately above in the email. This would especially be important when the post is replying to something further than 5 replies back.

---

<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: [February 24, 2015, 5:24am UTC](https://meta.discourse.org/t/forcing-email-context-input-requested/25577/14 "2015-02-24T05:24:39Z")

</div>

True that is also not addressed here. We should probably include the thing it is a direct reply to first, before dropping in the 5 prior unread (or read, if you want that) posts

---

<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: [February 24, 2015, 6:31am UTC](https://meta.discourse.org/t/forcing-email-context-input-requested/25577/15 "2015-02-24T06:31:30Z")

</div>

It really depends, in mailing list mode where every reply is in your mailbox you don’t want to duplicate any information. Also if someone is replying to 4000 word post you wrote odds of you figuring out what just happened would approach zero.

Also this is overloading the concept of context with “context type 1” and “context type 2” something that right away makes me uneasy.

---

<div class="post-metadata">

### Author: ![chapel](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/chapel/32/122414_2.png) [@chapel](https://meta.discourse.org/u/chapel)
#### Post date: [February 24, 2015, 6:55am UTC](https://meta.discourse.org/t/forcing-email-context-input-requested/25577/16 "2015-02-24T06:55:07Z")

</div>

It could be treated like a quote would. So it would only show a preview of the content. Having the context is important, many times I’ve got a reply to a post that wasn’t in the 5 before and subsequently I didn’t immediately know what the context was. I had to go to the thread, then click again to get to my post to know the context.

As far as I can tell, part of the reason to have the 5 previous posts for context is for solving the above, but it falls short.

Some examples:

[![](https://global.discourse-cdn.com/meta/original/4X/6/5/9/6590fb662746266efacf2fb5331034b5a1c2cc5c.png) ](https://dl.dropboxusercontent.com/s/bmwwzzfnjvukznf/Screenshot%202015-02-23%2022.48.48.png?dl=0)

[![](https://global.discourse-cdn.com/meta/original/4X/4/6/f/46ff1aff8f6982e696ba4794f5cba30011fc35a8.png) ](https://dl.dropboxusercontent.com/s/2ocn3iqbqeplqfz/Screenshot%202015-02-23%2022.52.12.png?dl=0)  
[![](https://global.discourse-cdn.com/meta/original/4X/8/6/0/86073cabd8d365a52693ef58c520f8aa304ed246.png) ](https://dl.dropboxusercontent.com/s/0dqzcrh3z3hyq86/Screenshot%202015-02-23%2022.53.14.png?dl=0)

Even with my post in the previous replies, it is hard to see that the reason I got the email is because it was a reply to me. We show that context on the forums, it is one of the core design tenants, I feel it is a shame we don’t show similar context at the least in the emails 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: [February 24, 2015, 7:19am UTC](https://meta.discourse.org/t/forcing-email-context-input-requested/25577/17 "2015-02-24T07:19:10Z")

</div>

> [@sam](#):
>
> It really depends, in mailing list mode where every reply is in your mailbox you don’t want to duplicate any information. Also if someone is replying to 4000 word post you wrote odds of you figuring out what just happened would approach zero.

Does not matter, allowing the user to set user pref for prior posts in emails to none, zero, zilch, zip, nada is a clear win.

It is true that a sane reply to a 4000 word post would quote some context or otherwise carry context. But a small reply to a small post that is number 45 of 100 in the topic.. I think the target post should be included in the payload as context, unless user has set email context to zero / never.

---

<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: [February 24, 2015, 7:26am UTC](https://meta.discourse.org/t/forcing-email-context-input-requested/25577/18 "2015-02-24T07:26:34Z")

</div>

But… context is always below, this is setting a new precedent and including context above.

Also, this little twist is complicating the setting being discussed here

Context: None|Auto|5 Previous Posts|5 Previous Posts + Reply

---

<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: [February 24, 2015, 7:34am UTC](https://meta.discourse.org/t/forcing-email-context-input-requested/25577/19 "2015-02-24T07:34:35Z")

</div>

Nah, it would still be below, the heading would say

### In Reply To

And then

### Previous Replies

As before. And this would ONLY happen for direct replies to stuff more than n posts back anyway.

---

<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: [February 24, 2015, 7:44am UTC](https://meta.discourse.org/t/forcing-email-context-input-requested/25577/20 "2015-02-24T07:44:34Z")

</div>

I am confused, context now include up to 5 last posts unconditionally, it does no offsetting.

would “in reply to” be fished out of the “previous replies” or would it remain and be duplicated.

[Next page](https://meta.discourse.org/t/forcing-email-context-input-requested/25577.md?page=2)
