Skip to content

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

Merged
bmarty merged 5 commits into
developfrom
feature/bma/usedDecryptedEvent
Feb 2, 2024
Merged

[Crypto] Improve Event.getClearContent() and fix assignement issue.#8744
bmarty merged 5 commits into
developfrom
feature/bma/usedDecryptedEvent

Conversation

@bmarty
Copy link
Copy Markdown
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.
@bmarty bmarty requested a review from BillCarsonFr February 1, 2024 17:13
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
@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.

2 participants