diff --git a/.changeset/light-terms-ring.md b/.changeset/light-terms-ring.md new file mode 100644 index 000000000000..4437c5c4d596 --- /dev/null +++ b/.changeset/light-terms-ring.md @@ -0,0 +1,5 @@ +--- +'@rocket.chat/meteor': patch +--- + +Fixes the issue where newly created teams are incorrectly displayed as channels on the sidebar when the DISABLE_DB_WATCHERS environment variable is enabled diff --git a/.changeset/old-coins-bow.md b/.changeset/old-coins-bow.md new file mode 100644 index 000000000000..1790cc205160 --- /dev/null +++ b/.changeset/old-coins-bow.md @@ -0,0 +1,5 @@ +--- +'@rocket.chat/apps-engine': patch +--- + +Fixes an issue that would cause apps to appear disabled after a subprocess restart diff --git a/.changeset/serious-mice-film.md b/.changeset/serious-mice-film.md new file mode 100644 index 000000000000..35a2d6704071 --- /dev/null +++ b/.changeset/serious-mice-film.md @@ -0,0 +1,5 @@ +--- +'@rocket.chat/meteor': patch +--- + +Fixes client-side updates for recent emoji list when custom emojis are modified. diff --git a/.changeset/stale-actors-enjoy.md b/.changeset/stale-actors-enjoy.md new file mode 100644 index 000000000000..baff2b19b667 --- /dev/null +++ b/.changeset/stale-actors-enjoy.md @@ -0,0 +1,5 @@ +--- +"@rocket.chat/meteor": patch +--- + +Fixes `waiting queue` feature. When `Livechat_waiting_queue` setting is enabled, incoming conversations should be sent to the queue instead of being assigned directly. diff --git a/.changeset/unlucky-kangaroos-yawn.md b/.changeset/unlucky-kangaroos-yawn.md new file mode 100644 index 000000000000..1aaa97cbd8d8 --- /dev/null +++ b/.changeset/unlucky-kangaroos-yawn.md @@ -0,0 +1,6 @@ +--- +"@rocket.chat/meteor": patch +"@rocket.chat/i18n": patch +--- + +Updates VoIP field labels from 'Free Extension Numbers' to 'Available Extensions' to better describe the field's purpose and improve clarity. diff --git a/apps/meteor/app/emoji-custom/client/lib/emojiCustom.ts b/apps/meteor/app/emoji-custom/client/lib/emojiCustom.ts index ee186ebd4e15..3f4b876f12a7 100644 --- a/apps/meteor/app/emoji-custom/client/lib/emojiCustom.ts +++ b/apps/meteor/app/emoji-custom/client/lib/emojiCustom.ts @@ -3,7 +3,7 @@ import { escapeRegExp } from '@rocket.chat/string-helpers'; import { Meteor } from 'meteor/meteor'; import { Session } from 'meteor/session'; -import { emoji, updateRecent } from '../../../emoji/client'; +import { emoji, removeFromRecent, replaceEmojiInRecent } from '../../../emoji/client'; import { CachedCollectionManager } from '../../../ui-cached-collection/client'; import { getURL } from '../../../utils/client'; import { sdk } from '../../../utils/client/lib/SDKClient'; @@ -49,7 +49,8 @@ export const deleteEmojiCustom = (emojiData: IEmoji) => { } } } - updateRecent(['rocket']); + + removeFromRecent(emojiData.name, emoji.packages.base.emojisByCategory.recent); }; export const updateEmojiCustom = (emojiData: IEmoji) => { @@ -94,7 +95,9 @@ export const updateEmojiCustom = (emojiData: IEmoji) => { } } - updateRecent(['rocket']); + if (previousExists) { + replaceEmojiInRecent({ oldEmoji: emojiData.previousName, newEmoji: emojiData.name }); + } }; const customRender = (html: string) => { diff --git a/apps/meteor/app/emoji/client/helpers.ts b/apps/meteor/app/emoji/client/helpers.ts index 35badda26a73..a203216640f5 100644 --- a/apps/meteor/app/emoji/client/helpers.ts +++ b/apps/meteor/app/emoji/client/helpers.ts @@ -138,7 +138,7 @@ export const getEmojisBySearchTerm = ( return emojis; }; -export const removeFromRecent = (emoji: string, recentEmojis: string[], setRecentEmojis: (emojis: string[]) => void) => { +export const removeFromRecent = (emoji: string, recentEmojis: string[], setRecentEmojis?: (emojis: string[]) => void) => { const _emoji = emoji.replace(/(^:|:$)/g, ''); const pos = recentEmojis.indexOf(_emoji as never); @@ -146,7 +146,7 @@ export const removeFromRecent = (emoji: string, recentEmojis: string[], setRecen return; } recentEmojis.splice(pos, 1); - setRecentEmojis(recentEmojis); + setRecentEmojis?.(recentEmojis); }; export const updateRecent = (recentList: string[]) => { @@ -156,6 +156,15 @@ export const updateRecent = (recentList: string[]) => { }); }; +export const replaceEmojiInRecent = ({ oldEmoji, newEmoji }: { oldEmoji: string; newEmoji: string }) => { + const recentPkgList: string[] = emoji.packages.base.emojisByCategory.recent; + const pos = recentPkgList.indexOf(oldEmoji); + + if (pos !== -1) { + recentPkgList[pos] = newEmoji; + } +}; + const getEmojiRender = (emojiName: string) => { const emojiPackageName = emoji.list[emojiName]?.emojiPackage; const emojiPackage = emoji.packages[emojiPackageName]; diff --git a/apps/meteor/app/livechat/server/lib/QueueManager.ts b/apps/meteor/app/livechat/server/lib/QueueManager.ts index 24be8d42b7a4..a467b6e0b360 100644 --- a/apps/meteor/app/livechat/server/lib/QueueManager.ts +++ b/apps/meteor/app/livechat/server/lib/QueueManager.ts @@ -94,8 +94,7 @@ export class QueueManager { const inquiryAgent = await RoutingManager.delegateAgent(defaultAgent, inquiry); logger.debug(`Delegating inquiry with id ${inquiry._id} to agent ${defaultAgent?.username}`); - await callbacks.run('livechat.beforeRouteChat', inquiry, inquiryAgent); - const dbInquiry = await LivechatInquiry.findOneById(inquiry._id); + const dbInquiry = await callbacks.run('livechat.beforeRouteChat', inquiry, inquiryAgent); if (!dbInquiry) { throw new Error('inquiry-not-found'); @@ -122,6 +121,10 @@ export class QueueManager { return LivechatInquiryStatus.QUEUED; } + if (settings.get('Livechat_waiting_queue')) { + return LivechatInquiryStatus.QUEUED; + } + if (RoutingManager.getConfig()?.autoAssignAgent) { return LivechatInquiryStatus.READY; } @@ -135,6 +138,7 @@ export class QueueManager { static async queueInquiry(inquiry: ILivechatInquiryRecord, room: IOmnichannelRoom, defaultAgent?: SelectedAgent | null) { if (inquiry.status === 'ready') { + logger.debug({ msg: 'Inquiry is ready. Delegating', inquiry, defaultAgent }); return RoutingManager.delegateInquiry(inquiry, defaultAgent, undefined, room); } @@ -252,7 +256,11 @@ export class QueueManager { throw new Error('room-not-found'); } - if (!newRoom.servedBy && settings.get('Omnichannel_calculate_dispatch_service_queue_statistics')) { + if ( + !newRoom.servedBy && + settings.get('Livechat_waiting_queue') && + settings.get('Omnichannel_calculate_dispatch_service_queue_statistics') + ) { const [inq] = await LivechatInquiry.getCurrentSortedQueueAsync({ inquiryId: inquiry._id, department, @@ -320,6 +328,10 @@ export class QueueManager { } private static dispatchInquiryQueued = async (inquiry: ILivechatInquiryRecord, room: IOmnichannelRoom, agent?: SelectedAgent | null) => { + if (RoutingManager.getConfig()?.autoAssignAgent) { + return; + } + logger.debug(`Notifying agents of new inquiry ${inquiry._id} queued`); const { department, rid, v } = inquiry; diff --git a/apps/meteor/client/views/admin/settings/groups/VoipGroupPage/AssignAgentModal.tsx b/apps/meteor/client/views/admin/settings/groups/VoipGroupPage/AssignAgentModal.tsx index 10a317832c03..518ac64b35d0 100644 --- a/apps/meteor/client/views/admin/settings/groups/VoipGroupPage/AssignAgentModal.tsx +++ b/apps/meteor/client/views/admin/settings/groups/VoipGroupPage/AssignAgentModal.tsx @@ -52,7 +52,7 @@ const AssignAgentModal = ({ existingExtension, closeModal, reload }: AssignAgent - {t('Free_Extension_Numbers')} + {t('Available_extensions')}