Skip to content
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

Show the correct shield status in tooltip for more conditions #28476

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

uhoreg
Copy link
Member

@uhoreg uhoreg commented Nov 15, 2024

Depends on matrix-org/matrix-js-sdk#4529
Fixes #28170

Checklist

  • Tests written for new code (and old code if feasible).
  • New or updated public/exported symbols have accurate TSDoc documentation.
  • Linter and other CI checks pass.
  • I have licensed the changes to Element by completing the Contributor License Agreement (CLA)

@uhoreg uhoreg changed the title Add support for new shield codes in JS SDK Show the correct shield status in tooltip for more conditions Nov 15, 2024
@uhoreg
Copy link
Member Author

uhoreg commented Nov 15, 2024

I think that this will need some trickery to merge this with the JS side. Obviously, this can't be merged until the JS PR is merged, since it uses values defined in that PR. But I think that when the JS side gets merged, then TypeScript will complain because the switch statement doesn't cover all cases. I think that one way to fix it is to add an Element PR that adds a default clause to the switch statement, merge that, then merge the JS PR, and then merge this PR.

@uhoreg uhoreg marked this pull request as ready for review November 15, 2024 20:54
@uhoreg uhoreg requested a review from a team as a code owner November 15, 2024 20:54
@uhoreg uhoreg requested review from t3chguy, MidhunSureshR, a team and BillCarsonFr and removed request for a team November 15, 2024 20:54
Copy link
Member

@BillCarsonFr BillCarsonFr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but I think it should match the decryption error message for that case when the trust decryption requirement is set?

break;

case EventShieldReason.VERIFICATION_VIOLATION:
shieldReasonMessage = _t("encryption|event_shield_reason_verification_violation");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it shoud match the existing copy for verification violation in invisible crypto? Sender's verified identity has changed as per decryption_failure > sender_identity_previously_verified ?
WDYT?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup, good catch. Fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Message from a previously-verified user has a shield stating "Unknown error"
3 participants