refactor(send queue): refactor in preparation for media local echoes #4176
+764
−667
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.
This refactors the send queue so that it can apply sending more abstract requests, instead of only sending plain events. This will generalize to media uploads soon, but in the future might also generalize to sending redactions, etc. So we now queue requests, update requests, and so on; which leads to some fun renaming in a massive patch, but no changes in functionality. Those would come in subsequent pull requests.
Indexeddb has a database format change, that is gently handled the same way we did for is_wedged vs wedged errors, that is: the migration applies at the reading boundary (we can't use the
#[serde(untagged)]
enum trick because we're storing a raw JSON value, and this is known to be buggy in serde). Sqlite hasn't been modified yet.Part of #1732.