doc: Add doc comments and changelog entries
This commit is contained in:
committed by
Jorge Martin Espinosa
parent
f314578df5
commit
2c2e0f1b15
@@ -44,6 +44,8 @@ All notable changes to this project will be documented in this file.
|
||||
|
||||
### Features
|
||||
|
||||
- Add `Client::get_dm_rooms` function to get a list with the DMs for the provided user id.
|
||||
([#6487](https://github.com/matrix-org/matrix-rust-sdk/pull/6487))
|
||||
- Expose `ffi::NotificationRoomInfo::service_members` so clients can use the list of service
|
||||
members to calculate if a room is a DM from the notification info.
|
||||
([#6474](https://github.com/matrix-org/matrix-rust-sdk/pull/6474))
|
||||
|
||||
@@ -1483,6 +1483,7 @@ impl Client {
|
||||
Ok(room)
|
||||
}
|
||||
|
||||
/// Get the first existing DM room with the given user, if any.
|
||||
pub fn get_dm_room(&self, user_id: String) -> Result<Option<Arc<Room>>, ClientError> {
|
||||
let user_id = UserId::parse(user_id)?;
|
||||
let sdk_room = self.inner.get_dm_room(&user_id);
|
||||
@@ -1491,6 +1492,7 @@ impl Client {
|
||||
Ok(dm)
|
||||
}
|
||||
|
||||
/// Get an iterator with the existing DM rooms for the given user.
|
||||
pub fn get_dm_rooms(&self, user_id: String) -> Result<Vec<Arc<Room>>, ClientError> {
|
||||
let user_id = UserId::parse(user_id)?;
|
||||
let sdk_rooms = self.inner.get_dm_rooms(&user_id);
|
||||
|
||||
@@ -8,6 +8,8 @@ All notable changes to this project will be documented in this file.
|
||||
|
||||
### Features
|
||||
|
||||
- Add `Client::get_dm_rooms` function to get an iterator with the DMs for the provided user id.
|
||||
([#6487](https://github.com/matrix-org/matrix-rust-sdk/pull/6487))
|
||||
- Support the stable `m.key_backup` prefix for MSC4287: Sharing key backup
|
||||
preference between clients.
|
||||
([#6410](https://github.com/matrix-org/matrix-rust-sdk/pull/6410))
|
||||
|
||||
@@ -1796,7 +1796,7 @@ impl Client {
|
||||
self.get_dm_rooms(user_id).next()
|
||||
}
|
||||
|
||||
/// Get an iterator with the existing DM rooms with the given user.
|
||||
/// Get an iterator with the existing DM rooms for the given user.
|
||||
pub fn get_dm_rooms(&self, user_id: &UserId) -> impl Iterator<Item = Room> {
|
||||
let rooms = self.joined_rooms();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user