Bump matrix-sdk dependency to 0.10.0 (#397)

This commit is contained in:
Ken Rachynski 2025-05-15 18:56:35 -06:00 committed by GitHub
parent 6529e61963
commit 93502f9993
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 656 additions and 284 deletions

916
Cargo.lock generated

File diff suppressed because it is too large Load diff

View file

@ -11,7 +11,7 @@ license = "Apache-2.0"
exclude = [".github", "CONTRIBUTING.md"] exclude = [".github", "CONTRIBUTING.md"]
keywords = ["matrix", "chat", "tui", "vim"] keywords = ["matrix", "chat", "tui", "vim"]
categories = ["command-line-utilities"] categories = ["command-line-utilities"]
rust-version = "1.76" rust-version = "1.82"
build = "build.rs" build = "build.rs"
[features] [features]
@ -87,7 +87,7 @@ version = "0.0.20"
#rev = "24f3ec11c7f634005a27b26878d0fbbdcc08f272" #rev = "24f3ec11c7f634005a27b26878d0fbbdcc08f272"
[dependencies.matrix-sdk] [dependencies.matrix-sdk]
version = "0.8.0" version = "0.10.0"
default-features = false default-features = false
features = ["e2e-encryption", "sqlite", "sso-login"] features = ["e2e-encryption", "sqlite", "sso-login"]

View file

@ -10,7 +10,7 @@ use std::path::{Path, PathBuf};
use std::process; use std::process;
use clap::Parser; use clap::Parser;
use matrix_sdk::matrix_auth::MatrixSession; use matrix_sdk::authentication::matrix::MatrixSession;
use matrix_sdk::ruma::{OwnedDeviceId, OwnedRoomAliasId, OwnedRoomId, OwnedUserId, UserId}; use matrix_sdk::ruma::{OwnedDeviceId, OwnedRoomAliasId, OwnedRoomId, OwnedUserId, UserId};
use ratatui::style::{Color, Modifier as StyleModifier, Style}; use ratatui::style::{Color, Modifier as StyleModifier, Style};
use ratatui::text::Span; use ratatui::text::Span;
@ -322,7 +322,7 @@ pub struct Session {
impl From<Session> for MatrixSession { impl From<Session> for MatrixSession {
fn from(session: Session) -> Self { fn from(session: Session) -> Self {
MatrixSession { MatrixSession {
tokens: matrix_sdk::matrix_auth::MatrixSessionTokens { tokens: matrix_sdk::authentication::matrix::MatrixSessionTokens {
access_token: session.access_token, access_token: session.access_token,
refresh_token: session.refresh_token, refresh_token: session.refresh_token,
}, },

View file

@ -606,7 +606,7 @@ impl ChatState {
let config = AttachmentConfig::new(); let config = AttachmentConfig::new();
let resp = room let resp = room
.send_attachment(name.as_ref(), &mime, bytes, config) .send_attachment(name, &mime, bytes, config)
.await .await
.map_err(IambError::from)?; .map_err(IambError::from)?;

View file

@ -419,7 +419,7 @@ impl RoomState {
// Try creating the room alias on the server. // Try creating the room alias on the server.
let alias_create_req = let alias_create_req =
CreateAliasRequest::new(orai.clone(), room.room_id().into()); CreateAliasRequest::new(orai.clone(), room.room_id().into());
if let Err(e) = client.send(alias_create_req, None).await { if let Err(e) = client.send(alias_create_req).await {
if let Some(ClientApiErrorKind::Unknown) = e.client_api_error_kind() { if let Some(ClientApiErrorKind::Unknown) = e.client_api_error_kind() {
// Ignore when it already exists. // Ignore when it already exists.
} else { } else {
@ -460,7 +460,7 @@ impl RoomState {
// If the room alias does not exist on the server, create it // If the room alias does not exist on the server, create it
let alias_create_req = CreateAliasRequest::new(orai, room.room_id().into()); let alias_create_req = CreateAliasRequest::new(orai, room.room_id().into());
if let Err(e) = client.send(alias_create_req, None).await { if let Err(e) = client.send(alias_create_req).await {
if let Some(ClientApiErrorKind::Unknown) = e.client_api_error_kind() { if let Some(ClientApiErrorKind::Unknown) = e.client_api_error_kind() {
// Ignore when it already exists. // Ignore when it already exists.
} else { } else {
@ -535,7 +535,7 @@ impl RoomState {
.application .application
.worker .worker
.client .client
.send(del_req, None) .send(del_req)
.await .await
.map_err(IambError::from)?; .map_err(IambError::from)?;
}, },
@ -568,7 +568,7 @@ impl RoomState {
.application .application
.worker .worker
.client .client
.send(del_req, None) .send(del_req)
.await .await
.map_err(IambError::from)?; .map_err(IambError::from)?;
}, },
@ -591,7 +591,7 @@ impl RoomState {
let msg = match field { let msg = match field {
RoomField::History => { RoomField::History => {
let visibility = room.history_visibility(); let visibility = room.history_visibility();
format!("Room history visibility: {visibility}") format!("Room history visibility: {visibility:?}")
}, },
RoomField::Id => { RoomField::Id => {
let id = room.room_id(); let id = room.room_id();

View file

@ -26,7 +26,7 @@ use matrix_sdk::{
encryption::verification::{SasVerification, Verification}, encryption::verification::{SasVerification, Verification},
encryption::{BackupDownloadStrategy, EncryptionSettings}, encryption::{BackupDownloadStrategy, EncryptionSettings},
event_handler::Ctx, event_handler::Ctx,
matrix_auth::MatrixSession, authentication::matrix::MatrixSession,
reqwest, reqwest,
room::{Messages, MessagesOptions, Room as MatrixRoom, RoomMember}, room::{Messages, MessagesOptions, Room as MatrixRoom, RoomMember},
ruma::{ ruma::{
@ -1391,7 +1391,7 @@ impl ClientWorker {
req.limit = Some(1000u32.into()); req.limit = Some(1000u32.into());
req.max_depth = Some(1u32.into()); req.max_depth = Some(1u32.into());
let resp = self.client.send(req, None).await.map_err(IambError::from)?; let resp = self.client.send(req).await.map_err(IambError::from)?;
let rooms = resp.rooms.into_iter().map(|chunk| chunk.room_id).collect(); let rooms = resp.rooms.into_iter().map(|chunk| chunk.room_id).collect();