Skip to content

Commit

Permalink
fix: Omnichannel transcript filename breaking links on some storages (#…
Browse files Browse the repository at this point in the history
…35354)

Co-authored-by: Jean Brito <[email protected]>
  • Loading branch information
2 people authored and sampaiodiego committed Feb 28, 2025
1 parent b19ed0f commit 4ad5aef
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
7 changes: 7 additions & 0 deletions .changeset/popular-boats-poke.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@rocket.chat/omnichannel-services": patch
"@rocket.chat/pdf-worker": patch
"@rocket.chat/meteor": patch
---

Fixes omnichannel transcript filename breaking download links
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,7 @@ export class OmnichannelTranscript extends ServiceClass implements IOmnichannelT
buffer,
details: {
// transcript_{company-name}_{date}_{hour}.pdf
name: `${transcriptText}_${data.siteName}_${new Intl.DateTimeFormat('en-US').format(new Date())}_${
name: `${transcriptText}_${data.siteName}_${new Intl.DateTimeFormat('en-US').format(new Date()).replace(/\//g, '-')}_${
data.visitor?.name || data.visitor?.username || 'Visitor'
}.pdf`,
type: 'application/pdf',
Expand Down
4 changes: 2 additions & 2 deletions ee/packages/pdf-worker/src/worker.fixtures.ts
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ export const bigConversationData = {
},
files: [
{
name: 'Transcript_Another test_4/24/2024_Alayna.pdf',
name: 'Transcript_Another test_4-24-2024_Alayna.pdf',
buffer: null,
},
],
Expand Down Expand Up @@ -454,7 +454,7 @@ export const bigConversationData = {
},
files: [
{
name: 'Transcript_Another test_4/24/2024_Alayna.pdf',
name: 'Transcript_Another test_4-24-2024_Alayna.pdf',
buffer: null,
},
],
Expand Down

0 comments on commit 4ad5aef

Please sign in to comment.