Can't create personal chats as an admin

As an admin, I am unable to create personal chats with other users.

However, according to the site settings, staff members should always have the ability to create personal chats.

Steps to reproduce:

  1. Set chat allowed groups to TL0 & direct message enabled groups to moderators
  2. As an admin, attempt to create a personal chat with a TL1 user.

Fix

This issue is related to PR #26010

When a user attempts to create a personal chat, we should not verify whether the target user has the ability to create personal chats. Instead, as specified in the site settings, we should verify whether the current user has the ability to create personal chats.

As long as the current user is a member of the direct message enabled groups or is a staff member, they should be able to create a personal chat.

I have submitted a pull request to fix this issue:

3 Likes