mirror of
https://github.com/youwen5/iamb.git
synced 2025-06-20 05:39:52 -07:00
Bump matrix-sdk dependency to 0.10.0 (#397)
This commit is contained in:
parent
6529e61963
commit
93502f9993
6 changed files with 656 additions and 284 deletions
|
@ -10,7 +10,7 @@ use std::path::{Path, PathBuf};
|
|||
use std::process;
|
||||
|
||||
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 ratatui::style::{Color, Modifier as StyleModifier, Style};
|
||||
use ratatui::text::Span;
|
||||
|
@ -322,7 +322,7 @@ pub struct Session {
|
|||
impl From<Session> for MatrixSession {
|
||||
fn from(session: Session) -> Self {
|
||||
MatrixSession {
|
||||
tokens: matrix_sdk::matrix_auth::MatrixSessionTokens {
|
||||
tokens: matrix_sdk::authentication::matrix::MatrixSessionTokens {
|
||||
access_token: session.access_token,
|
||||
refresh_token: session.refresh_token,
|
||||
},
|
||||
|
|
|
@ -606,7 +606,7 @@ impl ChatState {
|
|||
let config = AttachmentConfig::new();
|
||||
|
||||
let resp = room
|
||||
.send_attachment(name.as_ref(), &mime, bytes, config)
|
||||
.send_attachment(name, &mime, bytes, config)
|
||||
.await
|
||||
.map_err(IambError::from)?;
|
||||
|
||||
|
|
|
@ -419,7 +419,7 @@ impl RoomState {
|
|||
// Try creating the room alias on the server.
|
||||
let alias_create_req =
|
||||
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() {
|
||||
// Ignore when it already exists.
|
||||
} else {
|
||||
|
@ -460,7 +460,7 @@ impl RoomState {
|
|||
|
||||
// If the room alias does not exist on the server, create it
|
||||
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() {
|
||||
// Ignore when it already exists.
|
||||
} else {
|
||||
|
@ -535,7 +535,7 @@ impl RoomState {
|
|||
.application
|
||||
.worker
|
||||
.client
|
||||
.send(del_req, None)
|
||||
.send(del_req)
|
||||
.await
|
||||
.map_err(IambError::from)?;
|
||||
},
|
||||
|
@ -568,7 +568,7 @@ impl RoomState {
|
|||
.application
|
||||
.worker
|
||||
.client
|
||||
.send(del_req, None)
|
||||
.send(del_req)
|
||||
.await
|
||||
.map_err(IambError::from)?;
|
||||
},
|
||||
|
@ -591,7 +591,7 @@ impl RoomState {
|
|||
let msg = match field {
|
||||
RoomField::History => {
|
||||
let visibility = room.history_visibility();
|
||||
format!("Room history visibility: {visibility}")
|
||||
format!("Room history visibility: {visibility:?}")
|
||||
},
|
||||
RoomField::Id => {
|
||||
let id = room.room_id();
|
||||
|
|
|
@ -26,7 +26,7 @@ use matrix_sdk::{
|
|||
encryption::verification::{SasVerification, Verification},
|
||||
encryption::{BackupDownloadStrategy, EncryptionSettings},
|
||||
event_handler::Ctx,
|
||||
matrix_auth::MatrixSession,
|
||||
authentication::matrix::MatrixSession,
|
||||
reqwest,
|
||||
room::{Messages, MessagesOptions, Room as MatrixRoom, RoomMember},
|
||||
ruma::{
|
||||
|
@ -1391,7 +1391,7 @@ impl ClientWorker {
|
|||
req.limit = Some(1000u32.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();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue