From bcde22f594fc487fae151959576f73e89098f76a Mon Sep 17 00:00:00 2001 From: ivk Date: Mon, 23 Dec 2024 13:45:02 +0100 Subject: [PATCH] Do not resume export for temporary sessions --- src/mail-app/app.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/mail-app/app.ts b/src/mail-app/app.ts index c32926ef5acd..d03b2d4dfeab 100644 --- a/src/mail-app/app.ts +++ b/src/mail-app/app.ts @@ -37,6 +37,7 @@ import { disableErrorHandlingDuringLogout, handleUncaughtError } from "../common import { AppType } from "../common/misc/ClientConstants.js" import { ContactModel } from "../common/contactsFunctionality/ContactModel.js" import { CacheMode } from "../common/api/worker/rest/EntityRestClient" +import { SessionType } from "../common/api/common/SessionType.js" assertMainOrNodeBoot() bootFinished() @@ -190,9 +191,12 @@ import("./translations/en.js") mailLocator.logins.addPostLoginAction(async () => { return { onPartialLoginSuccess: async () => {}, - onFullLoginSuccess: async () => { - const controller = await mailLocator.mailExportController() - controller.resumeIfNeeded() + onFullLoginSuccess: async (event) => { + // not a temporary aka signup login + if (event.sessionType === SessionType.Persistent) { + const controller = await mailLocator.mailExportController() + controller.resumeIfNeeded() + } }, } })