Skip to content

Commit 07d5f39

Browse files
fix: document viewed event not trigger
1 parent 7cf638b commit 07d5f39

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

apps/OpenSignServer/cloud/customRoute/v1/routes/CreateDocumentWithTemplate.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ export default async function createDocumentWithTemplate(request, response) {
197197
object.set('TimeToCompleteDays', TimeToCompleteDays);
198198
}
199199
const enableOTP = request.body?.enableOTP === true ? true : false;
200-
const IsEnableOTP = template?.IsEnableOTP || enableOTP;
200+
const IsEnableOTP = enableOTP || template?.IsEnableOTP || false;
201201
object.set('IsEnableOTP', IsEnableOTP);
202202
object.set('CreatedBy', template.CreatedBy);
203203
object.set('ExtUserPtr', {

apps/OpenSignServer/cloud/parsefunction/callWebhook.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export default async function callWebhook(request) {
1212
const docRes = await docQuery.get(docId, { useMasterKey: true });
1313
const isEnableOTP = docRes?.get('IsEnableOTP') || false;
1414
let userId;
15-
if (!isEnableOTP) {
15+
if (isEnableOTP) {
1616
const userRes = await axios.get(serverUrl + '/users/me', {
1717
headers: {
1818
'X-Parse-Application-Id': appId,

0 commit comments

Comments
 (0)