Skip to content

Commit

Permalink
revert waiting key logic
Browse files Browse the repository at this point in the history
  • Loading branch information
KevLehman committed Oct 8, 2024
1 parent 919a82d commit f100dcf
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
2 changes: 1 addition & 1 deletion apps/meteor/app/e2e/client/rocketchat.e2e.room.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const PAUSED = Symbol('PAUSED');

const permitedMutations = {
[E2ERoomState.NOT_STARTED]: [E2ERoomState.ESTABLISHING, E2ERoomState.DISABLED, E2ERoomState.KEYS_RECEIVED],
[E2ERoomState.READY]: [E2ERoomState.DISABLED, E2ERoomState.CREATING_KEYS, E2ERoomState.WAITING_KEYS],
[E2ERoomState.READY]: [E2ERoomState.DISABLED, E2ERoomState.CREATING_KEYS],
[E2ERoomState.ERROR]: [E2ERoomState.KEYS_RECEIVED, E2ERoomState.NOT_STARTED],
[E2ERoomState.WAITING_KEYS]: [E2ERoomState.KEYS_RECEIVED, E2ERoomState.ERROR, E2ERoomState.DISABLED],
[E2ERoomState.ESTABLISHING]: [
Expand Down
5 changes: 0 additions & 5 deletions apps/meteor/app/e2e/client/rocketchat.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ import { getUserAvatarURL } from '../../utils/client';
import { sdk } from '../../utils/client/lib/SDKClient';
import { t } from '../../utils/lib/i18n';
import { E2EEState } from './E2EEState';
import { E2ERoomState } from './E2ERoomState';
import {
toString,
toArrayBuffer,
Expand Down Expand Up @@ -170,10 +169,6 @@ class E2E extends Emitter {
}
}

if (sub.encrypted && !sub.E2EKey && !sub.E2ESuggestedKey && !e2eRoom.isWaitingKeys()) {
e2eRoom.setState(E2ERoomState.WAITING_KEYS);
return;
}
sub.encrypted ? e2eRoom.resume() : e2eRoom.pause();

// Cover private groups and direct messages
Expand Down

0 comments on commit f100dcf

Please sign in to comment.