forked from matrix-org/matrix-rust-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Rebase #3
Open
yostyle
wants to merge
1,123
commits into
tchapgouv:main
Choose a base branch
from
matrix-org:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Rebase #3
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Instead of keeping on handling unwedged events from the sending queue, it's now required to re-enable the send queue manually for the room that encountered the sending error, all the time. This is more consistent, and avoids weird behavior when a user would 1. send an event for which sending fails, in an unrecoverable manner, 2. send an event that's actually sendable.
It claimed that it would immediately return when the cached display name value was computed, but that's absolutely not the case. Spotted while reviewing a PR updating `iamb` to the latest version of the SDK.
`compute_display_name` is made private again, and used only within the base crate. A new public counterpart `Room::display_name` is introduced, which returns a cached value for, or computes (and fills in cache) the display name. This is simpler to use, and likely what most users expect anyways.
I was investigating a potential deadlock with the event cache storage, and only found a few places where to make the code a bit more idiomatic and more readable.
With experimental-sliding-sync enabled and e2e-encryption disabled, there were a bunch of warnings about unused imports. This fixes them (but a few warnings about other unused items remain).
This is using the ruma-0.12 branch where non-breaking changes are backported. Signed-off-by: Kévin Commaille <[email protected]>
Signed-off-by: Kévin Commaille <[email protected]>
… code (#4472) We have quite a few `allow(dead_code)` annotations. While it's OK to use in situations where the Cargo-feature combination explodes and makes it hard to reason about when something is actually used or not, in other situations it can be avoided, and show actual, dead code.
Since 8205da8 it has been possible to attach (intentional) mentions to _edited_ media captions, but the send_$mediatype() timeline APIs provided no way to send them with the initial event. This fixes that. Signed-off-by: Joe Groocock <[email protected]>
This patch adds the `Pagination` variant to the `EventsOrigin` enum. Not something really mandatory and that is likely to fix a bug, but it's now correct.
This patch renames `RoomEvents::filter_duplicated_events` to `collect_valid_and_duplicated_events` as I believe it improves the understanding of the code. The variables named `unique_events` are renamed `events` as all (valid) events are returned, not only the unique ones.
…r_data_b64 fix(crypto): Serialize sender data msk in base64 instead of numbers
Note: `Box<dyn ProgressWatcher>` couldn't be put in a `Record`, so doesn't belong in `UploadParameters` as a result.
…uish early from late errors Some errors can be handled immediately and don't need a request to be spawned, e.g. invalid mimetype and so on. The returned task handle still deals about "late" errors about the upload failing (for sync uploads) or the send queue failing to push the media upload (for async uploads).
This is a breaking change because uniffi may use foreign-language named parameters based on the Rust parameter name.
If it's present, we just let it untouched. Otherwise, we set it to `error` if it's missing. See code comment explaining why we need this. This makes sure we log panics at the FFI layer, since the `log-panics` crate will use the `panic` target at the error level.
`owned_user_id` is only used by a test behind the `experimental-sliding-sync` feature flag.
This patch removes the `AddTimelineEvents` variant from `RoomEventCacheUpdate` since it is replaced by `UpdateTimelineEvents` which shares `VectorDiff`. This patch also tests all uses of `UpdateTimelineEvents` in existing tests.
From now on, this patch considers that `VectorDiff`s are the official input type for the `Timeline`, via `RoomEventCacheUpdate` (notably `::UpdateTimelineEvents`). This patch removes `TimelineSettings::vectordiffs_as_inputs`. It thus removes all deduplication logics, as it is supposed to be managed by the `EventCache` itself.
Signed-off-by: Kévin Commaille <[email protected]>
feat: Add MediaRetentionPolicy to the EventCacheStore, take 2
This patch moves `TimelineStateTransaction` and its implementation into its own module. The idea is to reduce the size of the `state.rs` module.
This patch moves `TimelineMetadata`, its implementation and companion types (like `RelativePosition`) into its own module. The idea is to reduce the size of the `state.rs` module.
This patch moves the `EventMeta` type from `state.rs` to `metadata.rs`.
Split the existing `set_up_test_machine` into two parts, so we can set up the test OlmMachine without importing data for other users
Per #4313, we should not send outgoing messages to dehydrated devices that are not signed by the current pinned/verified identity.
… around This patch moves the creations of the child tasks of the SyncService into the supervisor tasks itself. This should make it easier to let the supervisor recreate tasks. This will become useful once we introduce a offline mode where the supervisor task becomes responsible to restart syncing once we notice that the server is back online.
…cService This will allow us to more easily implement a restart method.
The `SyncService::stop()` method could fail for the following reasons: 1. The supervisor was not properly started up, this is a programmer error. 2. The supervisor task wouldn't shut down and instead it returns a JoinError. 3. We couldn't notify the supervisor task that it should shutdown due the channel being closed. All of those cases shouldn't ever happen and the supervisor task will be stopped in all of them. 1. Since there is no supervisor to be stopped, we can safely just log an error, our tests ensure that a `SyncService::start()` does create a supervisor. 2. A JoinError can be returned if the task has been cancelled or if the supervisor task has panicked. Since we never cancel the task, nor have any panics in the supervisor task, we can assume that this won't happen. 3. The supervisor task holds on to a reference to the receiving end of the channel, as long as the task is alive the channel can not be closed. In conclusion, it doesn't seem to be useful to forward these error cases to the user.
…n the SyncService
This test helper is the same as the assert_next_eq helper, but it waits for the stream to be ready for a certain amount of time instead of expecting it to be ready right away.
This patch removes a useless type conversion. The iterator produces `TimelineEvent`, so mapping to `TimelineEvent::from` is useless: we map `TimelineEvent` to `TimelineEvent`.
This patch removes a useless type conversion. The `Room::event()` method returns a `TimelineEvent`, so calling `Into::into` is useless: we map `TimelineEvent` to `TimelineEvent`.
… back. This patch uses `next_back()` instead of `last()`, which is equivalent but `last()` requires to iterate over the entire iterator, while `next_back()` is a single operation.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Signed-off-by: