FIX: Add check for PMs before showing AI helper context menu (#153)

This commit is contained in:
Keegan George 2023-08-23 11:24:51 -07:00 committed by GitHub
parent 4a00b7eb0e
commit 1289ae1c57
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

View File

@ -23,6 +23,12 @@ export default class AiHelperContextMenu extends Component {
allowedGroups.includes(g.id)
);
const canShowInPM = helper.siteSettings.ai_helper_allowed_in_pm;
if (outletArgs.composer.privateMessage) {
return helperEnabled && canUseAssistant && canShowInPM;
}
return helperEnabled && canUseAssistant;
}