Skip to content

Commit c95b247

Browse files
committed
matrix: use /v3/ instead of /r0/
1 parent c84aa14 commit c95b247

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

mstickerlib/src/matrix/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ pub async fn set_widget(matrix: &Config, sender: String, url: String) -> Result<
135135
let answer = CLIENT
136136
.get()
137137
.put(format!(
138-
"{}/_matrix/client/r0/user/{}/account_data/m.widgets",
138+
"{}/_matrix/client/v3/user/{}/account_data/m.widgets",
139139
matrix.homeserver_url, matrix.user
140140
))
141141
.query(&[("access_token", &matrix.access_token)])
@@ -159,7 +159,7 @@ pub async fn whoami(matrix: &Config) -> Result<Whoami, Error> {
159159
Url::parse(&matrix.homeserver_url)?; //check if homeserver_url is a valid url
160160
let answer = CLIENT
161161
.get()
162-
.get(format!("{}/_matrix/client/r0/account/whoami", matrix.homeserver_url))
162+
.get(format!("{}/_matrix/client/v3/account/whoami", matrix.homeserver_url))
163163
.query(&[("access_token", &matrix.access_token)])
164164
.send()
165165
.await?;
@@ -185,7 +185,7 @@ pub(crate) async fn upload(matrix: &Config, filename: &String, data: Arc<Vec<u8>
185185
pub(crate) async fn upload_ref(matrix: &Config, filename: &String, data: &[u8], mimetype: &str) -> Result<Mxc, Error> {
186186
let answer = CLIENT
187187
.get()
188-
.post(&format!("{}/_matrix/media/r0/upload", matrix.homeserver_url))
188+
.post(&format!("{}/_matrix/media/v3/upload", matrix.homeserver_url))
189189
.query(&[("access_token", &matrix.access_token), ("filename", filename)])
190190
.header("Content-Type", mimetype)
191191
.body(data.to_owned()) //TODO check for better solution

0 commit comments

Comments
 (0)