Update ruma
parent
8f99180c99
commit
95243003c4
|
@ -1402,10 +1402,10 @@ impl Client {
|
|||
sync_settings: SyncSettings<'_>,
|
||||
) -> Result<sync_events::Response> {
|
||||
let request = assign!(sync_events::Request::new(), {
|
||||
filter: sync_settings.filter,
|
||||
filter: sync_settings.filter.as_ref(),
|
||||
since: sync_settings.token.as_deref(),
|
||||
full_state: sync_settings.full_state,
|
||||
set_presence: PresenceState::Online,
|
||||
set_presence: &PresenceState::Online,
|
||||
timeout: sync_settings.timeout,
|
||||
});
|
||||
|
||||
|
@ -1496,13 +1496,11 @@ impl Client {
|
|||
#[instrument(skip(callback))]
|
||||
pub async fn sync_with_callback<C>(
|
||||
&self,
|
||||
sync_settings: SyncSettings<'_>,
|
||||
mut sync_settings: SyncSettings<'_>,
|
||||
callback: impl Fn(sync_events::Response) -> C,
|
||||
) where
|
||||
C: Future<Output = LoopCtrl>,
|
||||
{
|
||||
let mut sync_settings = sync_settings;
|
||||
let filter = sync_settings.filter;
|
||||
let mut last_sync_time: Option<Instant> = None;
|
||||
|
||||
if sync_settings.token.is_none() {
|
||||
|
@ -1510,6 +1508,7 @@ impl Client {
|
|||
}
|
||||
|
||||
loop {
|
||||
let filter = sync_settings.filter.clone();
|
||||
let response = self.sync_once(sync_settings.clone()).await;
|
||||
|
||||
let response = match response {
|
||||
|
@ -1577,8 +1576,8 @@ impl Client {
|
|||
.await
|
||||
.expect("No sync token found after initial sync"),
|
||||
);
|
||||
if let Some(f) = filter.as_ref() {
|
||||
sync_settings = sync_settings.filter(*f);
|
||||
if let Some(f) = filter {
|
||||
sync_settings = sync_settings.filter(f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -934,7 +934,7 @@ impl Room {
|
|||
member.currently_active = *currently_active;
|
||||
member.display_name = displayname.clone();
|
||||
member.last_active_ago = *last_active_ago;
|
||||
member.presence = Some(*presence);
|
||||
member.presence = Some(presence.clone());
|
||||
member.status_msg = status_msg.clone();
|
||||
|
||||
true
|
||||
|
@ -1091,6 +1091,7 @@ impl Describe for MembershipState {
|
|||
Self::Join => "is a member of",
|
||||
Self::Knock => "is requesting access to",
|
||||
Self::Leave => "has left",
|
||||
_ => "unhandled case of MembershipState",
|
||||
}
|
||||
.to_string()
|
||||
}
|
||||
|
|
|
@ -21,7 +21,7 @@ js_int = "0.1.9"
|
|||
[dependencies.ruma]
|
||||
version = "0.0.1"
|
||||
git = "https://github.com/ruma/ruma"
|
||||
rev = "50eb700571480d1440e15a387d10f98be8abab59"
|
||||
rev = "d16fd4b2c1be1b06fd9be99373a3e77d74fadff3"
|
||||
features = ["client-api", "unstable-pre-spec", "unstable-exhaustive-types"]
|
||||
|
||||
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
|
||||
|
|
|
@ -299,7 +299,7 @@ impl KeyRequestMachine {
|
|||
&self,
|
||||
event: &ToDeviceEvent<RoomKeyRequestEventContent>,
|
||||
) -> OlmResult<()> {
|
||||
let key_info = match event.content.action {
|
||||
let key_info = match &event.content.action {
|
||||
Action::Request => {
|
||||
if let Some(info) = &event.content.body {
|
||||
info
|
||||
|
@ -314,6 +314,10 @@ impl KeyRequestMachine {
|
|||
}
|
||||
// We ignore cancellations here since there's nothing to serve.
|
||||
Action::CancelRequest => return Ok(()),
|
||||
action => {
|
||||
warn!("Unknown room key request action: {:?}", action);
|
||||
return Ok(());
|
||||
}
|
||||
};
|
||||
|
||||
let session = self
|
||||
|
|
Loading…
Reference in New Issue