Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: allow Omnichannel Chats to be placed onHold even when the last message is not from the Agent #30527

Merged
merged 23 commits into from
Nov 1, 2023
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
06b610c
Updated useQuickActions.tsx to allow Omnichannel Chats to be placed o…
cabaceira Sep 29, 2023
aff1d43
added new setting and logic as per CC-13, allowing the default behavi…
cabaceira Oct 2, 2023
d090dbe
fixed minor identation issue, fixed the naming of the setting under t…
cabaceira Oct 3, 2023
e0901fa
changed according to PR suggestions
cabaceira Oct 17, 2023
2827a00
adjusted lint warnings
cabaceira Oct 17, 2023
96cf998
added backend validation in services/omnichannel.internalService.ts, …
cabaceira Oct 23, 2023
284740d
validating Room object projections
cabaceira Oct 24, 2023
a0965f2
Fixing PR corrections per reviewers
cabaceira Oct 27, 2023
f8c1960
updating typo on settings labels and conflicts resolution with dev
cabaceira Oct 27, 2023
74110a1
fixed conflict with useQuickActions.tsx
cabaceira Oct 27, 2023
f3edd78
removed tsx.orig file, updated types for placeRoomOnHold
cabaceira Oct 27, 2023
dc90be6
changed location of validations, updated types for placeRoomOnHold
cabaceira Oct 27, 2023
9d99e50
removed ts-ignore lint annotations
cabaceira Oct 30, 2023
97b2964
reverting removal of ts-ignore lint annotation
cabaceira Oct 30, 2023
0ad1c51
language for settings reviewed, last revert of ts-ignore lint annotat…
cabaceira Oct 30, 2023
496b25b
Merge branch 'develop' into omnichannel/chats-onHold-action-consolida…
cabaceira Oct 30, 2023
6100af8
included tests, more generic error to support all scenarios
cabaceira Oct 30, 2023
241ab1d
included tests, more generic error to support all scenarios , last cl…
cabaceira Oct 30, 2023
ebe1512
fixed tests, included visitor from startNewLivechatRoomAndTakeIt inst…
cabaceira Oct 30, 2023
fd2ff0a
Merge branch 'develop' into omnichannel/chats-onHold-action-consolida…
kodiakhq[bot] Nov 1, 2023
475afa1
Merge branch 'develop' into omnichannel/chats-onHold-action-consolida…
kodiakhq[bot] Nov 1, 2023
a4857b1
Merge branch 'develop' into omnichannel/chats-onHold-action-consolida…
kodiakhq[bot] Nov 1, 2023
31427d2
Merge branch 'develop' into omnichannel/chats-onHold-action-consolida…
kodiakhq[bot] Nov 1, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -309,8 +309,8 @@ export const useQuickActions = (): {
const canSendTranscriptPDF = usePermission('request-pdf-transcript');
const canCloseRoom = usePermission('close-livechat-room');
const canCloseOthersRoom = usePermission('close-others-livechat-room');
const canPlaceChatOnHold = Boolean(!room.onHold && room.u && !(room as any).lastMessage?.token && manualOnHoldAllowed);

const allowManualOnHoldUponAgentEngagement = useSetting('Livechat_allow_manual_on_hold_upon_agent_engagement_only');
const canPlaceChatOnHold = !room.onHold && room.u && manualOnHoldAllowed && (!allowManualOnHoldUponAgentEngagement || !(room as any).lastMessage?.token);
const hasPermissionButtons = (id: string): boolean => {
switch (id) {
case QuickActionsEnum.MoveQueue:
Expand Down
11 changes: 11 additions & 0 deletions apps/meteor/ee/app/livechat-enterprise/server/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,17 @@ export const createSettings = async (): Promise<void> => {
enableQuery: omnichannelEnabledQuery,
});

await settingsRegistry.add('Livechat_allow_manual_on_hold_upon_agent_engagement_only', true, {
type: 'boolean',
group: 'Omnichannel',
section: 'Sessions',
enterprise: true,
invalidValue: false,
public: true,
modules: ['livechat-enterprise'],
enableQuery: { _id: 'Livechat_allow_manual_on_hold', value: true },
});

await settingsRegistry.add('Livechat_auto_transfer_chat_timeout', 0, {
type: 'int',
group: 'Omnichannel',
Expand Down
3 changes: 2 additions & 1 deletion apps/meteor/packages/rocketchat-i18n/i18n/en.i18n.json
Original file line number Diff line number Diff line change
Expand Up @@ -3051,7 +3051,8 @@
"Livechat_agents": "Omnichannel agents",
"Livechat_Agents": "Agents",
"Livechat_allow_manual_on_hold": "Allow agents to manually place chat On Hold",
"Livechat_allow_manual_on_hold_Description": "If enabled, the agent will get a new option to place a chat On Hold, provided the agent has sent the last message",
"Livechat_allow_manual_on_hold_upon_agent_engagement_only": "Allow agents to manually place chat On Hold, provided the agent has sent the last message",
"Livechat_allow_manual_on_hold_upon_agent_engagement_only_Description": "If enabled, the agent will get a new option to place a chat On Hold, provided the agent has sent the last message, otherwise Agents are able to place chats onHold irrespective",
"Livechat_AllowedDomainsList": "Livechat Allowed Domains",
"Livechat_Appearance": "Livechat Appearance",
"Livechat_auto_close_on_hold_chats_custom_message": "Custom message for closed chats in On Hold queue",
Expand Down
5 changes: 3 additions & 2 deletions apps/meteor/packages/rocketchat-i18n/i18n/pt-BR.i18n.json
Original file line number Diff line number Diff line change
Expand Up @@ -2628,7 +2628,8 @@
"Livechat_agents": "Agentes do omnichannel",
"Livechat_Agents": "Agentes",
"Livechat_allow_manual_on_hold": "Permitir que agentes coloquem a conversa em espera manualmente",
"Livechat_allow_manual_on_hold_Description": "Se habilitado, o agente terá uma nova opção para colocar a conversa em espera, desde que o agente tenha enviado a última mensagem",
"Livechat_allow_manual_on_hold_upon_agent_engagement_only": "Permitir que agentes coloquem a conversa em espera manualmente, sempre que o agente tenha enviado a última mensagem",
"Livechat_allow_manual_on_hold_upon_agent_engagement_only_Description": "Se habilitado, o agente terá uma nova opção para colocar a conversa em espera, desde que o agente tenha enviado a última mensagem. Caso contrário poderá sempre colocar a conversa em espera.",
"Livechat_AllowedDomainsList": "Domínios permitidos em Livechat",
"Livechat_Appearance": "Aparência do livechat",
"Livechat_auto_close_on_hold_chats_custom_message": "Mensagem personalizada para conversas encerradas na fila em espera",
Expand Down Expand Up @@ -4971,4 +4972,4 @@
"RegisterWorkspace_Features_Omnichannel_Title": "Omnichannel",
"RegisterWorkspace_Setup_Label": "E-mail da conta da nuvem",
"cloud.RegisterWorkspace_Setup_Terms_Privacy": "Eu concordo com os <1>Termos e condições</1> e a <3>Política de privacidade</3>"
}
}