Skip to content

Commit

Permalink
refactor e2e rooms so that only creator can set the keys first time
Browse files Browse the repository at this point in the history
  • Loading branch information
KevLehman committed Oct 11, 2024
1 parent 99c04b1 commit 61b2fdf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apps/meteor/app/e2e/client/rocketchat.e2e.room.js
Original file line number Diff line number Diff line change
Expand Up @@ -245,8 +245,8 @@ export class E2ERoom extends Emitter {

try {
const room = ChatRoom.findOne({ _id: this.roomId });
if (!room.e2eKeyId) {
// TODO CHECK_PERMISSION
// Only room creator can set keys for room
if (!room.e2eKeyId && room.u._id === this.userId) {
this.setState(E2ERoomState.CREATING_KEYS);
await this.createGroupKey();
this.setState(E2ERoomState.READY);
Expand Down

0 comments on commit 61b2fdf

Please sign in to comment.