@@ -17,7 +18,9 @@ const DeleteMyAccountFinalStep = props => (
- Account Deletion Date and Time
+
+ {moment(props.scheduledDeletionDate).format('MMM Do YYYY, h:mm:ss a')}
+
@@ -45,6 +48,7 @@ const DeleteMyAccountFinalStep = props => (
DeleteMyAccountFinalStep.propTypes = {
finish: PropTypes.func.isRequired,
+ scheduledDeletionDate: PropTypes.string.isRequired,
};
export default DeleteMyAccountFinalStep;
diff --git a/plugins/talk-plugin-profile-data/client/mutations.js b/plugins/talk-plugin-profile-data/client/mutations.js
index 3ae0d88f7..d2a8881b8 100644
--- a/plugins/talk-plugin-profile-data/client/mutations.js
+++ b/plugins/talk-plugin-profile-data/client/mutations.js
@@ -32,6 +32,7 @@ export const withRequestAccountDeletion = withMutation(
return mutate({
variables: {},
update: proxy => {
+ debugger;
const RequestAccountDeletionQuery = gql`
query Talk_CancelAccountDeletion {
me {
@@ -46,7 +47,7 @@ export const withRequestAccountDeletion = withMutation(
});
const scheduledDeletionDate = moment()
- .add(12, 'hours')
+ .add(24, 'hours')
.toDate();
const data = update(prev, {
diff --git a/plugins/talk-plugin-profile-data/server/mutators.js b/plugins/talk-plugin-profile-data/server/mutators.js
index d3785c951..c895e51d8 100644
--- a/plugins/talk-plugin-profile-data/server/mutators.js
+++ b/plugins/talk-plugin-profile-data/server/mutators.js
@@ -93,16 +93,16 @@ async function sendDownloadLink(ctx) {
}
// requestDeletion will schedule the current user to have their account deleted
-// by setting the `scheduledDeletionDate` on the user 12 hours from now.
+// by setting the `scheduledDeletionDate` on the user 24 hours from now.
async function requestDeletion({ user, connectors: { models: { User } } }) {
// Ensure the user doesn't already have a deletion scheduled.
if (get(user, 'metadata.scheduledDeletionDate')) {
throw new ErrDeletionAlreadyScheduled();
}
- // Get the date in the future 12 hours from now.
+ // Get the date in the future 24 hours from now.
const scheduledDeletionDate = moment()
- .add(12, 'hours')
+ .add(24, 'hours')
.toDate();
// Amend the scheduledDeletionDate on the user.
From 0caa82c1c4ba14783808fc8a5741803f0da3048b Mon Sep 17 00:00:00 2001
From: Kim Gardner
Date: Thu, 3 May 2018 11:59:27 -0400
Subject: [PATCH 2/4] Typo
---
.../client/components/DeleteMyAccountFinalStep.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/plugins/talk-plugin-profile-data/client/components/DeleteMyAccountFinalStep.js b/plugins/talk-plugin-profile-data/client/components/DeleteMyAccountFinalStep.js
index d3604d1ae..ebf7200b6 100644
--- a/plugins/talk-plugin-profile-data/client/components/DeleteMyAccountFinalStep.js
+++ b/plugins/talk-plugin-profile-data/client/components/DeleteMyAccountFinalStep.js
@@ -30,8 +30,8 @@ const DeleteMyAccountFinalStep = props => (
- Tell us why. Wed like to know why you chose to delete
- your account. Send us feedback on our comment system by emailing.
+ Tell us why. We would like to know why you chose to
+ delete your account. Send us feedback on our comment system by emailing.
Tell us why. We would like to know why you chose to
- delete your account. Send us feedback on our comment system by emailing.
+ delete your account. Send us feedback on our comment system by emailing{' '}
+
+ {props.organizationContactEmail}
+ .
diff --git a/plugins/talk-plugin-profile-data/client/components/DeleteMyAccount.js b/plugins/talk-plugin-profile-data/client/components/DeleteMyAccount.js
index dc95c4b9e..1c7c12d16 100644
--- a/plugins/talk-plugin-profile-data/client/components/DeleteMyAccount.js
+++ b/plugins/talk-plugin-profile-data/client/components/DeleteMyAccount.js
@@ -78,19 +78,19 @@ class DeleteMyAccount extends React.Component {
Deleting your account will permanently erase your profile and remove
all your comments from this site.
-
- {scheduledDeletionDate &&
- `You have already submitted a request to delete your account.
- Your account will be deleted on ${moment(
- scheduledDeletionDate
- ).format('MMM Do YYYY, h:mm:ss a')}. You may
- cancel the request until that time`}
-
+ {scheduledDeletionDate && (
+
+ You have already submitted a request to delete your account. Your
+ account will be deleted on{' '}
+ {moment(scheduledDeletionDate).format('MMM Do YYYY, h:mm a')}. You
+ may cancel the request until that time.
+