Add Option to Disable User-User Chat

I’ve recently merged the below pull requests, which introduce a direct_message_enabled_groups setting, similar to personal_message_enabled_groups, which controls who is allowed to initiate a direct message conversation. This defaults to the Trust Level 1 automatic group, and staff (admin and moderators) can always send direct messages no matter what.

It’s important to note that this controls creation of direct message channels, but if for example this is set to only allow Trust Level 4 users to create a direct message channel, any users involved in the new channel will be able to respond to the message and chat back and forth in the new channel. For example:

  • direct_message_enabled_groups is set to 3|14, which are the staff + TL4 automatic groups
  • User jmcgill is TL1, and cannot create new direct message channels, nor can he see the personal chat section in the new sidebar
  • User kwexler is TL4, and she creates a direct message channel with jmcgill
  • The sidebar personal chat section will now show for jmcgill, and he can send messages to kwexler in their channel, but jmcgill cannot create new direct message channels

Here are the relevant commits:

7 Likes