diff --git a/src/plugins/Cases.ts b/src/plugins/Cases.ts index d8070856..b51de8e6 100644 --- a/src/plugins/Cases.ts +++ b/src/plugins/Cases.ts @@ -165,10 +165,11 @@ export class CasesPlugin extends ZeppelinPlugin { }); } - const archiveLinkMatch = body && body.match(/\/archives\/([a-zA-Z0-9\-]+)/); + const archiveLinkMatch = body && body.match(/(?<=\/archives\/)[a-zA-Z0-9\-]+/g); if (archiveLinkMatch) { - const archiveId = archiveLinkMatch[1]; - this.archives.makePermanent(archiveId); + for (const archiveId of archiveLinkMatch) { + this.archives.makePermanent(archiveId); + } } if ((!args.automatic || this.getConfig().log_automatic_actions) && args.postInCaseLogOverride !== false) {