Skip to content

🔥 The free & Open Source DocuSign alternative

fix: send wrong user activeMailAdapter data in sendmailv3 and signPdf function

RaktimaNXG5693fa230b22
diff --git a/apps/OpenSign/src/pages/PdfRequestFiles.js b/apps/OpenSign/src/pages/PdfRequestFiles.js
index eb9e9766a..c72fef66c 100644
--- a/apps/OpenSign/src/pages/PdfRequestFiles.js
+++ b/apps/OpenSign/src/pages/PdfRequestFiles.js
@@ -591,8 +591,9 @@ function PdfRequestFiles() {
);
//get ExistUserPtr object id of user class to get tenantDetails
const objectId = pdfDetails?.[0]?.ExtUserPtr?.UserId?.objectId;
-
- const res = await contractUsers(jsonSender?.email);
+ //get ExistUserPtr email of user class to get userDetails
+ const currentUserEmail = pdfDetails?.[0]?.ExtUserPtr?.Email;
+ const res = await contractUsers(currentUserEmail);
let activeMailAdapter = "";
if (res === "Error: Something went wrong!") {
setHandleError("Error: Something went wrong!");
@@ -1138,9 +1139,9 @@ function PdfRequestFiles() {
isDecline.currnt === "Sure"
? "Are you sure want to decline this document ?"
: isDecline.currnt === "YouDeclined"
- ? "You have declined this document!"
- : isDecline.currnt === "another" &&
- "You can not sign this document as it has been declined/revoked."
+ ? "You have declined this document!"
+ : isDecline.currnt === "another" &&
+ "You can not sign this document as it has been declined/revoked."
}
footerMessage={isDecline.currnt === "Sure"}
declineDoc={declineDoc}
diff --git a/apps/OpenSign/src/pages/PlaceHolderSign.js b/apps/OpenSign/src/pages/PlaceHolderSign.js
index cb8928940..d161c032b 100644
--- a/apps/OpenSign/src/pages/PlaceHolderSign.js
+++ b/apps/OpenSign/src/pages/PlaceHolderSign.js
@@ -173,15 +173,6 @@ function PlaceHolderSign() {
: rowLevel?.objectId && rowLevel.objectId;
const documentId = docId ? docId : objectId && objectId;
- const senderUser =
- localStorage.getItem(
- `Parse/${localStorage.getItem("parseAppId")}/currentUser`
- ) &&
- localStorage.getItem(
- `Parse/${localStorage.getItem("parseAppId")}/currentUser`
- );
- const jsonSender = JSON.parse(senderUser);
-
useEffect(() => {
if (documentId) {
getDocumentDetails();
@@ -406,7 +397,8 @@ function PlaceHolderSign() {
};
setIsLoading(loadObj);
}
- const res = await contractUsers(jsonSender.email);
+ const currentUserEmail = documentData[0]?.ExtUserPtr?.Email;
+ const res = await contractUsers(currentUserEmail);
if (res === "Error: Something went wrong!") {
const loadObj = {
isLoad: false