🔥 The free & Open Source DocuSign alternative
JavaScript digital-signaturedocument-signingdocusign-alternativedocusign-freee-signatureelectronic-signatureelectronic-signaturesesignesignaturehacktoberfestjavascriptlegaltechmongodbnodejsopen-sourcepdf-signpdf-signaturereactjsself-hostedsign-pdf-files
fix: document viewed event not trigger
prafull-opensignlabs07d5f393c0f1
diff --git a/apps/OpenSignServer/cloud/customRoute/v1/routes/CreateDocumentWithTemplate.js b/apps/OpenSignServer/cloud/customRoute/v1/routes/CreateDocumentWithTemplate.jsindex 784cd32fe..f23f1b330 100644--- a/apps/OpenSignServer/cloud/customRoute/v1/routes/CreateDocumentWithTemplate.js+++ b/apps/OpenSignServer/cloud/customRoute/v1/routes/CreateDocumentWithTemplate.js@@ -197,7 +197,7 @@ export default async function createDocumentWithTemplate(request, response) {object.set('TimeToCompleteDays', TimeToCompleteDays);}const enableOTP = request.body?.enableOTP === true ? true : false;- const IsEnableOTP = template?.IsEnableOTP || enableOTP;+ const IsEnableOTP = enableOTP || template?.IsEnableOTP || false;object.set('IsEnableOTP', IsEnableOTP);object.set('CreatedBy', template.CreatedBy);object.set('ExtUserPtr', {diff --git a/apps/OpenSignServer/cloud/parsefunction/callWebhook.js b/apps/OpenSignServer/cloud/parsefunction/callWebhook.jsindex 6d21b2ea3..59a1607a7 100644--- a/apps/OpenSignServer/cloud/parsefunction/callWebhook.js+++ b/apps/OpenSignServer/cloud/parsefunction/callWebhook.js@@ -12,7 +12,7 @@ export default async function callWebhook(request) {const docRes = await docQuery.get(docId, { useMasterKey: true });const isEnableOTP = docRes?.get('IsEnableOTP') || false;let userId;- if (!isEnableOTP) {+ if (isEnableOTP) {const userRes = await axios.get(serverUrl + '/users/me', {headers: {'X-Parse-Application-Id': appId,