# Chat Summary skipping bug

**URL:** https://meta.discourse.org/t/chat-summary-skipping-bug/356257
**Category:** Bug
**Tags:** chat
**Created:** [March 7, 2025, 2:05pm UTC](https://meta.discourse.org/t/chat-summary-skipping-bug/356257 "2025-03-07T14:05:13Z")
**Posts on this page:** 1
**Showing post:** 7

<div class="post-metadata">

### Author: ![davidb](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/davidb/32/554671_2.png) [@davidb](https://meta.discourse.org/u/davidb)
#### Post date: [May 26, 2025, 3:23pm UTC](https://meta.discourse.org/t/chat-summary-skipping-bug/356257/7 "2025-05-26T15:23:17Z")

</div>

I had a bit of a dig into this, and if we follow the trail there should be enrichment:

It starts from emailer [here](https://github.com/discourse/discourse/blob/main/app/jobs/regular/user_email.rb#L76) and then it [calls the user notification extension](https://github.com/discourse/discourse/blob/main/app/jobs/regular/user_email.rb#L239) which enriches with the user email [here](https://github.com/discourse/discourse/blob/main/plugins/chat/lib/chat/user_notifications_extension.rb#L133) and then passes it to the build email helper [here](https://github.com/discourse/discourse/blob/main/lib/email/build_email_helper.rb#L6) and finally sets the address in the message builder [here](https://github.com/discourse/discourse/blob/main/lib/email/message_builder.rb#L13) before sending it.

Aside from that the chat summary email already works on other sites so there is likely something else that is causing an issue here.

I think an interim solution is to pass the user email to the job which should give us a bit more confidence/visibility that the correct data is there from the outset:

[https://github.com/discourse/discourse/commit/487f610fc10aa85c1e0783917efaffbda2d8a1bf](https://github.com/discourse/discourse/commit/487f610fc10aa85c1e0783917efaffbda2d8a1bf)

---

_[View the full topic](https://meta.discourse.org/t/chat-summary-skipping-bug/356257)._
