Skip to content

Commit cd5a404

Browse files
committed
wut
1 parent 76cd7f6 commit cd5a404

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ee/app/livechat-enterprise/server/hooks/applyDepartmentRestrictions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { hasRole } from '../../../../../app/authorization/server/functions/hasRo
44
import { cbLogger } from '../lib/logger';
55

66
callbacks.add('livechat.applyDepartmentRestrictions', (originalQuery = {}, { userId } = { userId: null }) => {
7-
if (!userId || !hasRole(userId, 'livechat-monitor')) {
7+
if (!userId || (userId && !hasRole(userId, 'livechat-monitor'))) {
88
cbLogger.debug('Skipping callback. No user id provided or user is not a monitor');
99
return originalQuery;
1010
}

0 commit comments

Comments
 (0)