mirror of
https://github.com/matrix-org/matrix-rust-sdk.git
synced 2026-05-06 06:53:32 -04:00
refactor!(base): rename StateStore::update_dependent_queued_request to mark_dependent_queued_requests_as_ready
This commit is contained in:
@@ -1478,7 +1478,7 @@ impl StateStoreIntegrationTests for DynStateStore {
|
||||
// Update the event id.
|
||||
let event_id = owned_event_id!("$1");
|
||||
let num_updated = self
|
||||
.update_dependent_queued_request(
|
||||
.mark_dependent_queued_requests_as_ready(
|
||||
room_id,
|
||||
&txn0,
|
||||
SentRequestKey::Event(event_id.clone()),
|
||||
|
||||
@@ -917,7 +917,7 @@ impl StateStore for MemoryStore {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
async fn update_dependent_queued_request(
|
||||
async fn mark_dependent_queued_requests_as_ready(
|
||||
&self,
|
||||
room: &RoomId,
|
||||
parent_txn_id: &TransactionId,
|
||||
|
||||
@@ -424,15 +424,15 @@ pub trait StateStore: AsyncTraitDeps {
|
||||
content: DependentQueuedRequestKind,
|
||||
) -> Result<(), Self::Error>;
|
||||
|
||||
/// Update a set of dependent send queue requests with a key identifying the
|
||||
/// homeserver's response, effectively marking them as ready.
|
||||
/// Mark a set of dependent send queue requests as ready, using a key
|
||||
/// identifying the homeserver's response.
|
||||
///
|
||||
/// ⚠ Beware! There's no verification applied that the parent key type is
|
||||
/// compatible with the dependent event type. The invalid state may be
|
||||
/// lazily filtered out in `load_dependent_queued_requests`.
|
||||
///
|
||||
/// Returns the number of updated requests.
|
||||
async fn update_dependent_queued_request(
|
||||
async fn mark_dependent_queued_requests_as_ready(
|
||||
&self,
|
||||
room_id: &RoomId,
|
||||
parent_txn_id: &TransactionId,
|
||||
@@ -709,14 +709,14 @@ impl<T: StateStore> StateStore for EraseStateStoreError<T> {
|
||||
.map_err(Into::into)
|
||||
}
|
||||
|
||||
async fn update_dependent_queued_request(
|
||||
async fn mark_dependent_queued_requests_as_ready(
|
||||
&self,
|
||||
room_id: &RoomId,
|
||||
parent_txn_id: &TransactionId,
|
||||
sent_parent_key: SentRequestKey,
|
||||
) -> Result<usize, Self::Error> {
|
||||
self.0
|
||||
.update_dependent_queued_request(room_id, parent_txn_id, sent_parent_key)
|
||||
.mark_dependent_queued_requests_as_ready(room_id, parent_txn_id, sent_parent_key)
|
||||
.await
|
||||
.map_err(Into::into)
|
||||
}
|
||||
|
||||
@@ -1594,7 +1594,7 @@ impl_state_store!({
|
||||
Ok(())
|
||||
}
|
||||
|
||||
async fn update_dependent_queued_request(
|
||||
async fn mark_dependent_queued_requests_as_ready(
|
||||
&self,
|
||||
room_id: &RoomId,
|
||||
parent_txn_id: &TransactionId,
|
||||
|
||||
@@ -1924,7 +1924,7 @@ impl StateStore for SqliteStateStore {
|
||||
.await
|
||||
}
|
||||
|
||||
async fn update_dependent_queued_request(
|
||||
async fn mark_dependent_queued_requests_as_ready(
|
||||
&self,
|
||||
room_id: &RoomId,
|
||||
parent_txn_id: &TransactionId,
|
||||
|
||||
@@ -1077,7 +1077,9 @@ impl QueueStorage {
|
||||
let store = client.store();
|
||||
|
||||
// Update all dependent requests.
|
||||
store.update_dependent_queued_request(&self.room_id, transaction_id, parent_key).await?;
|
||||
store
|
||||
.mark_dependent_queued_requests_as_ready(&self.room_id, transaction_id, parent_key)
|
||||
.await?;
|
||||
|
||||
let removed = store.remove_send_queue_request(&self.room_id, transaction_id).await?;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user