diff --git a/.changeset/omnichannel-audit-visitor-agent-filtering.md b/.changeset/omnichannel-audit-visitor-agent-filtering.md new file mode 100644 index 0000000000000..2a455e91f9442 --- /dev/null +++ b/.changeset/omnichannel-audit-visitor-agent-filtering.md @@ -0,0 +1,5 @@ +--- +'@rocket.chat/meteor': patch +--- + +Fix Omnichannel audit filtering by forwarding selected visitor and agent IDs to `POST /v1/audit.omnichannelMessages` API endpoint. diff --git a/apps/meteor/client/views/audit/hooks/useAuditMutation.ts b/apps/meteor/client/views/audit/hooks/useAuditMutation.ts index 46ef734070064..71eea4468b4dd 100644 --- a/apps/meteor/client/views/audit/hooks/useAuditMutation.ts +++ b/apps/meteor/client/views/audit/hooks/useAuditMutation.ts @@ -23,11 +23,8 @@ export const useAuditMutation = (type: IAuditLog['fields']['type']) => { startDate, endDate, users, - // TODO: the Omnichannel audit form collects visitor/agent (required fields) but they are - // dropped here — carried over from the original DDP flow. Forwarding them would let the - // omnichannel audit filter by the selected visitor/agent. Left for investigation. - visitor: '', - agent: '', + visitor, + agent, }); return messages.map((message) => mapMessageFromApi(message)); }