Publish current project state

This commit is contained in:
2026-09-14 10:47:21 +08:00
parent 0dd188c46f
commit 4ad56ee9f8
186 changed files with 6289 additions and 1657 deletions
@@ -1,4 +1,8 @@
import { CONVERSATION_PRIORITY_ORDER } from 'shared/constants/messages';
import {
ROLE_AGENT,
ROLE_ADMINISTRATOR,
} from 'dashboard/constants/permissions.js';
export const findPendingMessageIndex = (chat, message) => {
const { echo_id: tempMessageId } = message;
@@ -79,9 +83,9 @@ export const applyRoleFilter = (
) => {
// the role === "agent" check is typically not correct on it's own
// the backend handles this by checking the custom_role_id at the user model
// here however, the `getUserRole` returns "custom_role" if the id is present,
// here however, `getUserRole` returns the custom-role constant if the id is present,
// so we can check the role === "agent" directly
if (['administrator', 'agent'].includes(role)) {
if ([ROLE_ADMINISTRATOR, ROLE_AGENT].includes(role)) {
return true;
}