-
-
Notifications
You must be signed in to change notification settings - Fork 590
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix the warning for messages from unsigned devices #3743
Conversation
@@ -2738,6 +2738,8 @@ export class Crypto extends TypedEventEmitter<CryptoEvent, CryptoEventHandlerMap | |||
const senderId = event.getSender(); | |||
if (!senderId || encryptionInfo.mismatchedSender) { | |||
// something definitely wrong is going on here | |||
|
|||
// previously: E2EState.Warning -> E2ePadlockUnverified -> Red/"Encrypted by an unverified session" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these "previously" comments relate to the old logic in EventTile
(https://github.com/matrix-org/matrix-react-sdk/blob/v3.80.1/src/components/views/rooms/EventTile.tsx#L579-L637). I found them useful for double-checking the logic.
@@ -1649,6 +1649,7 @@ function rustEncryptionInfoToJsEncryptionInfo( | |||
if (shieldState.message === null) { | |||
shieldReason = null; | |||
} else if (shieldState.message === "Encrypted by an unverified user.") { | |||
// this case isn't actually used with lax shield semantics. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is unrelated, but something I came across while I was figuring out what happened and it doesn't feel like worth making a separate PR for
#3693 attempted to port the logic for event shields from react-sdk to js-sdk, but I seem to have messed up this case.
I've double checked all the logic and... it's hopefully right this time.
Here's what your changelog entry will look like:
🐛 Bug Fixes