Skip to content

Commit

Permalink
Enable message-ids on to-device messages (#42)
Browse files Browse the repository at this point in the history
  • Loading branch information
richvdh authored Oct 19, 2023
1 parent c361e0f commit 0254112
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# UNRELEASED

- Attach message IDs to outgoing to-device messages, and log the IDs on
incoming messages.

- Improve logging output to include more information, including data that is
attached to tracing spans. Remove the `tracing` feature: tracing support is
now always included.
Expand Down
10 changes: 10 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,4 @@ zeroize = "1.6.0"
git = "https://github.com/matrix-org/matrix-rust-sdk"
rev = "7c958498bfdb41652823bd8bce6a4b25d7c13a97"
default_features = false
features = ["js", "backups_v1", "automatic-room-key-forwarding"]
features = ["js", "backups_v1", "automatic-room-key-forwarding", "message-ids"]
2 changes: 2 additions & 0 deletions tests/machine.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -488,6 +488,8 @@ describe(OlmMachine.name, () => {
expect(requests[0].id).toBeDefined();
const content = JSON.parse(requests[0].body);
expect(Object.keys(content.messages)).toEqual(["@example:localhost"]);
const messageContent = content.messages["@example:localhost"]["AFGUOBTZWM"];
expect(messageContent["org.matrix.msgid"]).toBeDefined();

await m.markRequestAsSent(requests[0].id, RequestType.ToDevice, "{}");
const requestsAfterMarkedAsSent = await m.shareRoomKey(room, other_users, new EncryptionSettings());
Expand Down

0 comments on commit 0254112

Please sign in to comment.