We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
RoomPreview::forget
1 parent 77a67de commit 5e1bae0Copy full SHA for 5e1bae0
bindings/matrix-sdk-ffi/src/room_preview.rs
@@ -65,6 +65,14 @@ impl RoomPreview {
65
invite_details.inviter.and_then(|m| m.try_into().ok())
66
}
67
68
+ /// Forget the room if we had access to it, and it was left or banned.
69
+ pub async fn forget(&self) -> Result<(), ClientError> {
70
+ let room =
71
+ self.client.get_room(&self.inner.room_id).context("missing room for a room preview")?;
72
+ room.forget().await?;
73
+ Ok(())
74
+ }
75
+
76
/// Get the membership details for the current user.
77
pub async fn own_membership_details(&self) -> Option<RoomMembershipDetails> {
78
let room = self.client.get_room(&self.inner.room_id)?;
0 commit comments