Commit Graph

2424 Commits

Author SHA1 Message Date
Benjamin Kampmann 92044cedb9 fixing style again 2022-01-07 12:03:19 +01:00
Benjamin Kampmann fb81ebf301 fixing style again 2022-01-07 12:00:12 +01:00
Benjamin Kampmann 278d934973 fix broken merge 2022-01-07 11:49:51 +01:00
Benjamin Kampmann 0937c2e6f6 [fix ci] remove unused import 2022-01-07 10:46:46 +01:00
Benjamin Kampmann e1ad8fe8e0 Merge remote-tracking branch 'upstream/main' into ben-wasm-store 2022-01-07 10:42:52 +01:00
Damir Jelić c79e62d80e Merge branch 'fix-verification-double-start' 2022-01-04 14:59:52 +01:00
ftilde f4249c591a Return RoomEvents from decryption methods
Previously, these methods returned `SyncRoomEvent`s instead, even though
the decrypted events are required to contain a room_id field (in order
for the server to not to be able to change these). As a side effect,
glue code which adds a room_id to the `SyncRoomEvent` to convert it to a
`RoomEvent` is be removed in some places.

When a `SyncRoomEvent` is required (such as in code handling sync
responses), the `From` implementation of `SyncRoomEvent` can be used.
2022-01-03 22:48:51 +01:00
ftilde 37cadc7c29 Add From<RoomEvent> for SyncRoomEvent
Since SyncRoomEvents are just RoomEvents without a room_id, it is safe
to just discard the information that this field exists in the underlying
json.
2022-01-03 22:48:30 +01:00
ftilde a1cf8b613d Drop start requests from lower precedence parties if sas has already been started.
According to the guide for implementing verification started from
a verification request, both parties should (or at least allowed to)
send a start request when the verification is ready. However, only the
start request from the party with lexicographically smaller user id (or
device id, for device verification, and thus equal user id) is supposed
to be accepted, and the other one ignored.
2022-01-03 21:04:07 +01:00
ftilde 798464b68e Verification: Handle Accept after Start on both sides
Previously, when a sas-workflow was started by the other party (e.g.
from a verification request), but the own start request was answered with
an "accept" this accept would be ignored. However, this is incorrect
since the official guide on implementing verification actually states
that both parties are expected to send start-requests, where of those
only one request is actually accepted (depending on user id and possibly
the device id).
2022-01-03 21:02:53 +01:00
ftilde 87de0b5883 Return broken messages unchanged from messages()
Without this change, a batch with a message that cannot be deserialized
(for whatever reason) means that the batch cannot be processed at all by
the caller. Now, those messages are returned unchanged in the batch so
that the caller can handle them.
2022-01-03 19:49:19 +01:00
Damir Jelić 5003ed1493 docs: Enable all features for some of our crates when building docs 2022-01-03 13:14:36 +01:00
Damir Jelić f12f03b8da docs: Switch to the doc_auto_cfg feature 2022-01-03 12:33:24 +01:00
Damir Jelić 9856270e75 fix(crypto): Don't enable the backup feature by default 2022-01-03 12:27:03 +01:00
Damir Jelić c22fa4e3fd fix(base): Fix a new clippy warning 2022-01-03 10:23:38 +01:00
Julien Merzoug f7f30f1636 docs(sdk): Fix a typo 2022-01-03 13:05:35 +08:00
Damir Jelić ae9a554808 Merge branch 'supported-versions' 2021-12-31 14:00:11 +01:00
Kévin Commaille 5ecd74b2e4 feat(sdk): Make get_supported_versions public 2021-12-31 13:02:15 +01:00
Damir Jelić dd29e2087c Merge branch 'common-fixes' 2021-12-31 12:54:49 +01:00
Jonas Platte 99ce9419aa Fix futures-util dependency
Turn on alloc feature that is required for `future::join_all`.
2021-12-31 11:00:51 +01:00
Kévin Commaille 0d771565f9 feat(sdk): Simplify the API of Common::event 2021-12-31 02:34:16 +01:00
Kévin Commaille c35f8c55ac fix(sdk): Fix docs of Common::active_members_no_sync 2021-12-31 02:16:20 +01:00
ftilde 703e965172 Decrypt messages from room::Common::messages()
Due to additional error possibilities and encryption info for messages,
the return type of the method was changed accordingly and a wrapper
struct `Messages` was introduced.
2021-12-29 15:26:45 +01:00
ftilde 046bfa9dad Fix typo in comment 2021-12-29 15:26:39 +01:00
Damir Jelić 035d319122 Merge branch 'travis/misc' 2021-12-28 11:52:23 +01:00
Damir Jelić 81b730d8c3 Merge branch 'request-config-expose-force_auth' 2021-12-28 11:31:08 +01:00
Damir Jelić 6170be95e1 Merge branch 'membership' 2021-12-28 10:59:34 +01:00
Benjamin Kampmann 34687733e5 create sync token store 2021-12-27 23:54:51 +01:00
Benjamin Kampmann 8ce622d11e fixin style 2021-12-27 23:37:45 +01:00
Benjamin Kampmann 9ff4609f3d testing emcc versions 2021-12-27 23:35:21 +01:00
Benjamin Kampmann 15cdaead50 fix broken now call 2021-12-27 23:27:11 +01:00
Benjamin Kampmann 3cde28a438 trying older emscripten 2021-12-27 21:37:37 +01:00
Jonas Platte d92d7771d9 Add must_use attribute to config constructors and methods
These all don't have side effects so discarding the result wouldn't make
sense.
2021-12-27 17:21:21 +01:00
Jonas Platte f6d7933601 Simplify filter closure 2021-12-27 14:56:31 +01:00
Jonas Platte abf525390e Fix clippy warning (remove unnecessary clone) 2021-12-27 14:56:19 +01:00
Jonas Platte fea80843eb Remove redundant calls to .into_iter() 2021-12-27 14:21:46 +01:00
Jonas Platte 1a7baf631e Avoid enormous type name in GroupSessionManager::encrypt_session_for 2021-12-27 14:20:16 +01:00
Benjamin Kampmann cbd4aa0a37 disable test failing on macosx 2021-12-22 13:58:54 +01:00
Benjamin Kampmann 98beff4455 resolve clippy complaints 2021-12-22 12:36:07 +01:00
Benjamin Kampmann 574893368b refine wasm tests 2021-12-22 12:32:59 +01:00
Benjamin Kampmann 1f5a084ccf don't fail fast 2021-12-22 11:38:52 +01:00
Benjamin Kampmann 8dda7ea8fa please consider all includes 2021-12-22 11:19:39 +01:00
Benjamin Kampmann e619cc1eb7 don't combine 2021-12-22 10:59:17 +01:00
Benjamin Kampmann 1a206ff36c let them all run out 2021-12-16 18:46:00 +01:00
Benjamin Kampmann afe7d055a1 [ci] fix syntax 2021-12-16 18:24:31 +01:00
Benjamin Kampmann 9d4d8667ff latest and node 2021-12-16 17:14:03 +01:00
Benjamin Kampmann 8feab722f8 [CI] dynamic node version 2021-12-16 11:35:24 +01:00
Benjamin Kampmann 7ad5bc7dee version listing 2021-12-16 11:15:10 +01:00
Benjamin Kampmann 71bc043d19 extended testing for wasm example 2021-12-16 10:52:15 +01:00
Travis Ralston 171c334cb1 Add .idea directory to gitignore 2021-12-14 18:59:23 -07:00