Leaving a private group chat does not actually remove you

Version: 3.2.0.beta4-dev running from commit a5ed0ea5d6

Steps to reproduce:

  1. Invite someone to a group chat
  2. Click the big red “Leave channel” thingy
  3. It still says you’re in it and you can still visit the URL. You can check from another account

For fun I tried running this and it still failed:

DELETE FROM user_chat_channel_memberships WHERE chat_channel_id = <id> AND user_id = <id>; 

I was battling this last week with a chat group of 16 members. My workaround was to hide the group by getting everyone to leave, aside from myself. After 20 minutes or so, the group chat icon changed from 16 to 1, although all the members were still showing up in the list.

But earlier today someone found a mention/notification from earlier in the group’s conversation, inadvertently replied to it without realizing, and that immediately resurrected the group. The icon shows 16 again.

This afternoon, I built a new Discourse instance to verify it wasn’t database or plugin related, and the problem easily reproduced.


Muting the channel prevents spam notifications although that doesn’t actually remove you.


Pings actually still override this for some reason, both in chat channels and DMs.


Thank you to everyone who reported this issue — I’ve documented it with our team and we’re adding it to our roadmap to fix.


The lovely @joffreyjaffeux deployed an update today that should take care of this — you’ll need to be on the latest code, but when I tested, it worked like a charm.

After leaving a group chat, the user won’t be listed as a member, receive notifications for the group chat, or have access to the group chat directly (i.e. via URL) — until someone adds them back to the group.

Please take a look and let us know if you notice any issues!


2 posts were split to a new topic: How do you leave a group chat?