Skip to content

Commit

Permalink
runfix: do not allow a new client to snooze the enrolment
Browse files Browse the repository at this point in the history
  • Loading branch information
PatrykBuniX committed Apr 25, 2024
1 parent 5b516aa commit b955508
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/script/E2EIdentity/E2EIdentityEnrollment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -330,11 +330,14 @@ export class E2EIHandler extends TypedEventEmitter<Events> {
// Clear the e2e identity progress
await this.coreE2EIService.clearAllProgress();

return new Promise<void>(resolve => {
// A fresh MLS client should be forced to enrol.
const shouldHideSnooze = (await isFreshMLSSelfClient()) || !snoozable;

return new Promise<void>(async resolve => {
const {modalOptions, modalType} = getModalOptions({
type: ModalType.ERROR,
hideClose: true,
hideSecondary: !snoozable,
hideSecondary: shouldHideSnooze,
primaryActionFn: async () => {
await this.enroll(snoozable);
resolve();
Expand Down

0 comments on commit b955508

Please sign in to comment.