Skip to content

Commit

Permalink
fix: message toolbar e2ee not decrypted (#33652)
Browse files Browse the repository at this point in the history
  • Loading branch information
hugocostadev authored Oct 18, 2024
1 parent 687f1ef commit 019a69a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/tame-dolls-know.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rocket.chat/meteor": patch
---

Fixes message toolbar showing in End-to-end encrypted room when messages are not decrypted
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ const RoomMessage = ({
<RoomMessageContent message={message} unread={unread} mention={mention} all={all} searchText={searchText} />
)}
</MessageContainer>
{!message.private && <MessageToolbarHolder message={message} context={context} />}
{!message.private && message?.e2e !== 'pending' && <MessageToolbarHolder message={message} context={context} />}
</Message>
);
};
Expand Down
3 changes: 3 additions & 0 deletions apps/meteor/tests/e2e/e2e-encryption.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -420,6 +420,9 @@ test.describe.serial('e2e-encryption', () => {
'This message is end-to-end encrypted. To view it, you must enter your encryption key in your account settings.',
);
await expect(poHomeChannel.content.lastUserMessage.locator('.rcx-icon--name-key')).toBeVisible();

await poHomeChannel.content.lastUserMessage.hover();
await expect(page.locator('[role=toolbar][aria-label="Message actions"]')).not.toBeVisible();
});

test('expect placeholder text in place of encrypted file description, when E2EE is not setup and non-encrypted files upload in disabled e2ee room', async ({
Expand Down

0 comments on commit 019a69a

Please sign in to comment.