Commit Graph

3105 Commits

Author SHA1 Message Date
Ivan Enderlin
2d15f758da feat(crypto): Use JavaScript naming style for methods. 2022-05-31 08:35:09 +02:00
Ivan Enderlin
acd5de3cf3 feat(crypto): Implement ServerName, and add UserId.serverName. 2022-05-31 08:35:09 +02:00
Ivan Enderlin
f0bb35a96c feat(crypto): Add changed and left to the constructor of DeviceLists. 2022-05-31 08:35:09 +02:00
Ivan Enderlin
1d38e54739 feat(crypto): Return a JsError rather than a String. 2022-05-31 08:35:09 +02:00
Ivan Enderlin
08665dcd1c feat(crypto): Implement our own future_to_promise helper to simplify code.
`wasm_bindgen_future::future_to_promise` expects a `Future<Output =
Result<JsValue, JsValue>>`. We reimplement this function by expecting
a `Future<Output = Result<T, anyhow::Error>>` where `T:
Into<JsValue>`. That way, we apply the type conversions to `JsValue`
inside this helper rather than in the call site. Additionally, all
errors are managed automatically without having to deal with `JsError`
or `JsValue`. It makes the code simpler to read and easier to write
from my point of view.
2022-05-31 08:35:09 +02:00
Ivan Enderlin
569adb7ceb feat(crypto) Implement OlmMachine.identity_keys. 2022-05-31 08:35:09 +02:00
Ivan Enderlin
fd4dff79d4 feat(crypto) Implement OlmMachine.user_id, .device_id and .display_name. 2022-05-31 08:35:09 +02:00
Ivan Enderlin
fdb9fe21c6 feat(crypto) Remove existing unwrap code. 2022-05-31 08:35:09 +02:00
Ivan Enderlin
7e5eec82c5 feat(crypto) Implement OlmMachine.outgoing_requests. 2022-05-31 08:35:09 +02:00
Ivan Enderlin
901715bcf3 chore(crypto) Generate a smaller Wasm module. 2022-05-31 08:35:09 +02:00
Ivan Enderlin
3aa46fa746 feat(crypto) Implement OlmMachine.receive_sync_changes & friends. 2022-05-31 08:35:09 +02:00
Ivan Enderlin
3318789a8b feat(crypto) Implement UserId, DeviceId and OlmMachine in Wasm for JS. 2022-05-31 08:35:09 +02:00
Ivan Enderlin
0fe0910fea feat(crypto) Reduce Wasm binary size by enabling LTO. 2022-05-31 08:35:09 +02:00
Ivan Enderlin
5c6a6464c4 chore(crypto) Fix a typo in the code. 2022-05-09 11:50:40 +02:00
Ivan Enderlin
d3c20b2a13 feat(crypto) Generate a cdylib for the crate.
Ask `rustc` to generate a dynamic system library, which will be useful
to generate a Wasm module.
2022-05-09 10:51:18 +02:00
Ivan Enderlin
7817af9aa6 feat(crypto) Add the js feature.
This patch updates to code to raise a compilation error if the `js`
feature is used for another architecture than `wasm32`.
2022-05-09 10:40:32 +02:00
Ivan Enderlin
7569c08ada feat(crypto) Add wasm-bindgen as a dep and simplify Cargo.toml. 2022-05-09 10:40:13 +02:00
Charlotte
be2a818c84 feat(base)!: Use boxed errors in StoreError and CryptoStoreError 2022-05-06 17:05:27 +02:00
Benjamin Kampmann
8b805f9f01 Merge pull request #649 from zecakeh/display-name
DisplayName fixes
2022-05-06 14:46:49 +02:00
Benjamin Kampmann
86b9dc5e57 style(appservice): Remove allocation and make clippy happy 2022-05-06 14:08:27 +02:00
Jonas Platte
260f888a89 chore(appservice): Fix another clippy warning 2022-05-06 14:08:01 +02:00
Jonas Platte
5907fac248 chore(base): Rewrite BaseRoomInfo::handle_redaction 2022-05-06 14:08:01 +02:00
Jonas Platte
3c8da5f7e1 feat(base): Handle redactions in BaseRoomInfo 2022-05-06 14:08:01 +02:00
Jonas Platte
8043b6c1e1 chore(base): Store topic event's ID in BaseRoomInfo 2022-05-06 14:08:01 +02:00
Jonas Platte
4e16f79ad2 chore(base): Store tombstone event's ID in BaseRoomInfo 2022-05-06 14:08:01 +02:00
Jonas Platte
f93baf7ed4 chore(base): Store name event's ID in BaseRoomInfo 2022-05-06 14:08:01 +02:00
Jonas Platte
9e058b6202 chore(base): Store join_rules event's ID in BaseRoomInfo 2022-05-06 14:08:01 +02:00
Jonas Platte
a5e81ebcc9 chore(base): Store history_visibility event's ID in BaseRoomInfo 2022-05-06 14:08:01 +02:00
Jonas Platte
aa7fc8ff47 chore(base): Store guest_access event's ID in BaseRoomInfo 2022-05-06 14:08:01 +02:00
Jonas Platte
849fbe94f1 chore(base): Store create event's ID in BaseRoomInfo 2022-05-06 14:08:01 +02:00
Jonas Platte
c9527e7263 chore(base): Store canonical_alias event's ID in BaseRoomInfo 2022-05-06 14:08:01 +02:00
Jonas Platte
9a3b81178f chore(base): Store avatar event's ID in BaseRoomInfo
Required to make redactions work properly.
2022-05-06 14:08:01 +02:00
Jonas Platte
1e9e13ab63 chore(base): Use RoomInfo::room_version accessor 2022-05-06 14:08:01 +02:00
Kévin Commaille
2545e1bd72 fix(sdk): Re-export DisplayName 2022-05-06 11:35:48 +02:00
Kévin Commaille
1b8337cdc2 doc(sdk-base): Fix typo 2022-05-06 11:35:48 +02:00
Jonas Platte
b95aea9cf0 chore(crypto): Fix new clippy warning 2022-05-06 11:29:35 +02:00
Julian Sparber
12cdf8c159 chore(sdk): Use OnceCell to store server versions 2022-05-06 11:08:10 +02:00
Benjamin Kampmann
2054f5deef docs(crypto-ffi) Fix a typo in the README.md
Merge pull request #645 from Hywan/doc-readme-typo
2022-05-06 08:23:28 +02:00
Benjamin Kampmann
0a6983512a Merge pull request #646 from Hywan/doc-sdk-base-readme-typo
docs(sdk-base) Fix a typo in the `README.md`
2022-05-06 08:07:34 +02:00
Ivan Enderlin
977438207c docs(sdk-base) Fix a typo in the README.md. 2022-05-05 13:42:34 +02:00
Ivan Enderlin
87b849a95b docs(crypto-ffi) Fix a typo in the README.md. 2022-05-05 13:36:39 +02:00
Damir Jelić
3a4656cedd Merge branch 'poljar/cleanup-verification-constructors' 2022-05-05 13:16:34 +02:00
Benjamin Kampmann
7e399e1e8d Merge pull request #644 from matrix-org/poljar/fix-sled-cryptostore-only-compilation
fix(sled): Fix the compilation if only the cryptostore is enabled
2022-05-05 12:43:38 +02:00
Benjamin Kampmann
b9e92886de refactor!: Put timeline behind experimental-timeline-feature-flag 2022-05-05 12:31:02 +02:00
Damir Jelić
2c415abce8 fix(sled): Fix the compilation if only the cryptostore is enabled 2022-05-05 12:22:16 +02:00
Benjamin Kampmann
3de2a9ad22 feat(sled): Add state store db schema version support
Merge pull request #640 from matrix-org/gnunicorn/issue585
2022-05-05 12:13:30 +02:00
Benjamin Kampmann
0f95687bec fix(base): Don't create empty changeset for each run 2022-05-05 12:11:33 +02:00
Damir Jelić
2a5f17005d refactor(crypto): Make the transaction id non-optional in the Sas constructor 2022-05-05 11:55:00 +02:00
Benjamin Kampmann
5fce18f4dd chore: remove unneccessary feature-flag 2022-05-05 11:21:34 +02:00
Benjamin Kampmann
93b42236fe chore: Merge remote-tracking branch 'origin/main' into b-featureflag-timeline 2022-05-05 10:33:56 +02:00