matrix-sdk: Return the members response in our get members method.
parent
e84d3b9950
commit
c13d04ae18
|
@ -70,7 +70,8 @@ use matrix_sdk_common::{
|
|||
filter::{create_filter::Request as FilterUploadRequest, FilterDefinition},
|
||||
media::create_content,
|
||||
membership::{
|
||||
ban_user, forget_room, get_member_events,
|
||||
ban_user, forget_room,
|
||||
get_member_events::{self, Response as MembersResponse},
|
||||
invite_user::{self, InvitationRecipient},
|
||||
join_room_by_id, join_room_by_id_or_alias, kick_user, leave_room, Invite3pid,
|
||||
},
|
||||
|
@ -1468,13 +1469,14 @@ impl Client {
|
|||
self.send(request).await
|
||||
}
|
||||
|
||||
async fn room_members(&self, room_id: &RoomId) -> Result<()> {
|
||||
/// Get the room members for the given room.
|
||||
pub async fn room_members(&self, room_id: &RoomId) -> Result<MembersResponse> {
|
||||
let request = get_member_events::Request::new(room_id);
|
||||
let response = self.send(request).await?;
|
||||
|
||||
self.base_client.receive_members(room_id, &response).await?;
|
||||
|
||||
Ok(())
|
||||
Ok(response)
|
||||
}
|
||||
|
||||
/// Synchronize the client's state with the latest state on the server.
|
||||
|
|
Loading…
Reference in New Issue