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

Fix ToDeviceRequest conversion #41

Merged
merged 8 commits into from
Oct 19, 2023
Merged

Conversation

BillCarsonFr
Copy link
Member

@BillCarsonFr BillCarsonFr commented Oct 17, 2023

Fixes element-hq/element-web#26382

When used in WebR, olmMachine.shareRoomKey() was always returning ToDeviceRequest without id (undefined).
As a consequence markRequestAsSent was never called, and room keys were re-shared for each message.

I tried to clarify in bindings when there should be a request_id. So I replaced a most of the pub id: Option<JsString>, with pub id: JsString,.
The conversion methods have been updated also.

@BillCarsonFr BillCarsonFr requested review from Hywan and richvdh October 17, 2023 14:05
CHANGELOG.md Outdated Show resolved Hide resolved
src/requests.rs Outdated Show resolved Hide resolved
src/requests.rs Outdated Show resolved Hide resolved
src/requests.rs Outdated Show resolved Hide resolved
src/requests.rs Outdated Show resolved Hide resolved
src/requests.rs Outdated Show resolved Hide resolved
src/requests.rs Outdated Show resolved Hide resolved
src/requests.rs Outdated Show resolved Hide resolved
src/requests.rs Show resolved Hide resolved
tests/machine.test.js Outdated Show resolved Hide resolved
@BillCarsonFr BillCarsonFr requested a review from richvdh October 18, 2023 15:28
Copy link
Member

@richvdh richvdh left a comment

Choose a reason for hiding this comment

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

lgtm otherwise

src/requests.rs Outdated Show resolved Hide resolved
Comment on lines +194 to +196
/// Some signature upload will have to an `id` field, some won't.
/// They have one when they are created automatically during an interactive
/// verification, otherwise they don't.
Copy link
Member

Choose a reason for hiding this comment

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

Bump

@BillCarsonFr BillCarsonFr merged commit c361e0f into main Oct 19, 2023
3 checks passed
@BillCarsonFr BillCarsonFr deleted the valere/fix_to_device_conversion branch October 19, 2023 09:31
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.

Element-R keeps sending and resending the same to-device for room keys
2 participants