clarify behavior in service::account_data::changes_since docs

This commit is contained in:
Olivia Lee 2025-03-23 01:42:51 -07:00
parent fe14300d91
commit 6897f0ba34
No known key found for this signature in database
GPG key ID: 54D568A15B9CD1F9
2 changed files with 6 additions and 0 deletions

View file

@ -48,6 +48,9 @@ impl Service {
} }
/// Returns all changes to the account data that happened after `since`. /// Returns all changes to the account data that happened after `since`.
///
/// When there have been multiple changes to the same event type, returned
/// map contains the most recent value.
#[tracing::instrument(skip(self, room_id, user_id, since))] #[tracing::instrument(skip(self, room_id, user_id, since))]
pub(crate) fn changes_since( pub(crate) fn changes_since(
&self, &self,

View file

@ -28,6 +28,9 @@ pub(crate) trait Data: Send + Sync {
) -> Result<Option<Box<serde_json::value::RawValue>>>; ) -> Result<Option<Box<serde_json::value::RawValue>>>;
/// Returns all changes to the account data that happened after `since`. /// Returns all changes to the account data that happened after `since`.
///
/// When there have been multiple changes to the same event type, returned
/// map contains the most recent value.
fn changes_since( fn changes_since(
&self, &self,
room_id: Option<&RoomId>, room_id: Option<&RoomId>,