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

[Crypto] Improve Event.getClearContent() and fix assignement issue. #8744

Merged
merged 5 commits into from
Feb 2, 2024

Conversation

bmarty
Copy link
Member

@bmarty bmarty commented Feb 1, 2024

Type of change

  • Feature
  • Bugfix
  • Technical
  • Other :

Content

The first commit should prevent encrypted content to be parsed as decoded Event. Hopefully there will be no side effect. I have checked and this should be fine.
The last commit is fixing an issue, calling RoomService.refreshJoinedRoomSummaryPreviews has never worked as expected with the Crypto Rust SDK.

Motivation and context

Should fix lots of error logs when undecrypted Events content are mapped to Content model.

Screenshots / GIFs

Tests

  • Run the app and send encrypted message after discarding the session.

Tested devices

  • Physical
  • Emulator
  • OS version(s):

Checklist

…pted content when the content is not decrypted.
This may fix issue of Event not decrypted if the key is coming late for the last Event displayed in the Room list.
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

val roomId = content.sessionId ?: return@forEach
val sessionId = content.sessionId

val roomId = content.roomId
Copy link
Member

Choose a reason for hiding this comment

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

ouch :/

@bmarty
Copy link
Member Author

bmarty commented Feb 1, 2024

There is a failing test Mixed content event should be detected, I am looking at it.

@bmarty bmarty merged commit 1277f6f into develop Feb 2, 2024
10 of 11 checks passed
@bmarty bmarty deleted the feature/bma/usedDecryptedEvent branch February 2, 2024 08:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants