3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-18 07:35:02 +00:00

When adding archive links to a case, make them all permanent, not just the first one

This commit is contained in:
Dragory 2019-04-20 19:13:40 +03:00
parent 57dad804b6
commit 77b6ddb7ad

View file

@ -165,10 +165,11 @@ export class CasesPlugin extends ZeppelinPlugin<ICasesPluginConfig> {
});
}
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) {