# System messages in chat groups

**URL:** <https://forum.heroiclabs.com/t/system-messages-in-chat-groups/5574>\
**Category:** Runtime Framework\
**Created:** [August 21, 2024, 10:08pm UTC](https://forum.heroiclabs.com/t/system-messages-in-chat-groups/5574 "2024-08-21T22:08:15Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![rhs3322](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/rhs3322/32/2306_2.png) [@rhs3322](https://forum.heroiclabs.com/u/rhs3322)\
**Post date:** [August 21, 2024, 10:08pm UTC](https://forum.heroiclabs.com/t/system-messages-in-chat-groups/5574/1 "2024-08-21T22:08:15Z")

</div>

I don’t want system messages stored in chat groups related to user login, logout and expulsion.  
How can I do this?

---

<div class="post-metadata">

**Author:** ![sesposito](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/sesposito/32/2594_2.png) [@sesposito](https://forum.heroiclabs.com/u/sesposito)\
**Post date:** [August 22, 2024, 2:12pm UTC](https://forum.heroiclabs.com/t/system-messages-in-chat-groups/5574/2 "2024-08-22T14:12:29Z")

</div>

Hello @rhs3322,

You can simply ignore the messages in the client based on their code (see [Real-time Chat - Heroic Labs Documentation](https://heroiclabs.com/docs/nakama/concepts/chat/#groups-1)).

If you really want to delete the messages from the db, you can add some [after hooks](https://heroiclabs.com/docs/nakama/server-framework/introduction/hooks/#after-hooks) that run some custom SQL to delete the messages with the codes you’d like to ignore.

Hope this helps.

---

<div class="post-metadata">

**Author:** ![rhs3322](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/rhs3322/32/2306_2.png) [@rhs3322](https://forum.heroiclabs.com/u/rhs3322)\
**Post date:** [August 24, 2024, 5:54am UTC](https://forum.heroiclabs.com/t/system-messages-in-chat-groups/5574/3 "2024-08-24T05:54:46Z")

</div>

So it is not possible to set Nakama so that it does not store these messages in the database at all?

---

<div class="post-metadata">

**Author:** ![sesposito](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/sesposito/32/2594_2.png) [@sesposito](https://forum.heroiclabs.com/u/sesposito)\
**Post date:** [September 2, 2024, 9:45am UTC](https://forum.heroiclabs.com/t/system-messages-in-chat-groups/5574/4 "2024-09-02T09:45:43Z")

</div>

Currently no this is not possible.
