Can get single profile information
This commit is contained in:
@@ -3,7 +3,7 @@ use crate::controllers::matrix::media_controller;
|
||||
use crate::extractors::matrix_client_extractor::MatrixClientExtractor;
|
||||
use actix_web::{HttpRequest, HttpResponse, web};
|
||||
use futures_util::{StreamExt, stream};
|
||||
use matrix_sdk::ruma::{OwnedRoomId, OwnedUserId};
|
||||
use matrix_sdk::ruma::{OwnedMxcUri, OwnedRoomId, OwnedUserId};
|
||||
use matrix_sdk::{Room, RoomMemberships};
|
||||
|
||||
#[derive(serde::Serialize)]
|
||||
@@ -11,7 +11,7 @@ pub struct APIRoomInfo {
|
||||
id: OwnedRoomId,
|
||||
name: Option<String>,
|
||||
members: Vec<OwnedUserId>,
|
||||
has_avatar: bool,
|
||||
avatar: Option<OwnedMxcUri>,
|
||||
}
|
||||
|
||||
impl APIRoomInfo {
|
||||
@@ -25,7 +25,7 @@ impl APIRoomInfo {
|
||||
.into_iter()
|
||||
.map(|r| r.user_id().to_owned())
|
||||
.collect::<Vec<_>>(),
|
||||
has_avatar: r.avatar_url().is_some(),
|
||||
avatar: r.avatar_url(),
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user