From 00b6f094668c008c0a87d733e2bd404f47460688 Mon Sep 17 00:00:00 2001 From: Miguel Serrano Date: Thu, 20 May 2021 10:59:43 +0200 Subject: [PATCH] Hotfix 2.6.2 (#888) --- server-ce/hotfix/2.6.2/Dockerfile | 5 ++++ server-ce/hotfix/2.6.2/onboarding-email.patch | 25 +++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 server-ce/hotfix/2.6.2/Dockerfile create mode 100644 server-ce/hotfix/2.6.2/onboarding-email.patch diff --git a/server-ce/hotfix/2.6.2/Dockerfile b/server-ce/hotfix/2.6.2/Dockerfile new file mode 100644 index 0000000000..2df365143e --- /dev/null +++ b/server-ce/hotfix/2.6.2/Dockerfile @@ -0,0 +1,5 @@ +FROM sharelatex/sharelatex:2.6.1 + +# Patch: fixes overleaf.com onboarding email being sent in CE/SP +COPY onboarding-email.patch ${baseDir} +RUN cd ${baseDir} && patch -p0 < onboarding-email.patch diff --git a/server-ce/hotfix/2.6.2/onboarding-email.patch b/server-ce/hotfix/2.6.2/onboarding-email.patch new file mode 100644 index 0000000000..2d1fed5686 --- /dev/null +++ b/server-ce/hotfix/2.6.2/onboarding-email.patch @@ -0,0 +1,25 @@ +--- /var/www/sharelatex/web/app/src/Features/User/UserCreator.js ++++ /var/www/sharelatex/web/app/src/Features/User/UserCreator.js +@@ -85,13 +85,15 @@ async function createNewUser(attributes, options = {}) { + } + + Analytics.recordEvent(user._id, 'user-registered') +- try { +- await UserOnboardingEmailQueueManager.scheduleOnboardingEmail(user) +- } catch (error) { +- logger.error( +- `Failed to schedule sending of onboarding email for user '${user._id}'`, +- error +- ) ++ if(Features.hasFeature('saas')) { ++ try { ++ await UserOnboardingEmailQueueManager.scheduleOnboardingEmail(user) ++ } catch (error) { ++ logger.error( ++ `Failed to schedule sending of onboarding email for user '${user._id}'`, ++ error ++ ) ++ } + } + + return user