From c13a66de814df973c86f685bef5c21681b49c114 Mon Sep 17 00:00:00 2001 From: Aleksandr Fedorov Date: Tue, 10 Oct 2023 17:17:27 +0300 Subject: [PATCH] fixed: bug with several macros previous same document --- src/main/java/onlyoffice/macro/OnlyOfficePreviewMacro.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/onlyoffice/macro/OnlyOfficePreviewMacro.java b/src/main/java/onlyoffice/macro/OnlyOfficePreviewMacro.java index 9673b7c7..c5502627 100644 --- a/src/main/java/onlyoffice/macro/OnlyOfficePreviewMacro.java +++ b/src/main/java/onlyoffice/macro/OnlyOfficePreviewMacro.java @@ -129,7 +129,7 @@ public String execute(final Map args, final String s, final Conv } final Map context = this.velocityHelperService.createDefaultVelocityContext(); - context.put("id", documentManager.getKeyOfFile(attachment.getId(), true)); + context.put("id", System.currentTimeMillis()); context.put("attachmentId", attachment.getId()); context.put("action", action); context.put("docServiceApiUrl", urlManager.getDocServiceApiUrl());