# Chat channels broke after user deleted

**URL:** <https://meta.discourse.org/t/chat-channels-broke-after-user-deleted/234858>\
**Category:** Bug\
**Tags:** chat\
**Created:** [August 2, 2022, 6:10pm UTC](https://meta.discourse.org/t/chat-channels-broke-after-user-deleted/234858 "2022-08-02T18:10:47Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![Don](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/don/32/228726_2.png) [@Don](https://meta.discourse.org/u/Don)\
**Post date:** [August 2, 2022, 6:10pm UTC](https://meta.discourse.org/t/chat-channels-broke-after-user-deleted/234858/1 "2022-08-02T18:10:47Z")

</div>

Hello,

I noticed on our forum the chat channels are empty after we deleted a user from Discourse, who wrote in the specific channel. I updated before I write this topic so Discourse and Discourse Chat is also on latest.

Repro:

1. Write a message in a channel with UserA
2. Delete UserA from Discourse
3. The channel is seems to empty _(the other members messages also disappears)_ with the following console error.  
 ![Screenshot 2022-08-02 at 19.44.35](https://global.discourse-cdn.com/meta/original/4X/e/8/2/e829a5b0afc7e5e115466debfbc8d2d04401196b.png)  
`Uncaught TypeError: Cannot read properties of null (reading 'username')`

Thanks 🙂

---

_[View the full topic](https://meta.discourse.org/t/chat-channels-broke-after-user-deleted/234858)._
