From 8aa6b86fa54ad71c1161a663e48a151b107d6b43 Mon Sep 17 00:00:00 2001 From: mb Date: Tue, 19 Dec 2023 16:16:57 +0100 Subject: [PATCH] wip --- bindings/prose-sdk-js/src/client.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/bindings/prose-sdk-js/src/client.rs b/bindings/prose-sdk-js/src/client.rs index 609ab2fd..4feda622 100644 --- a/bindings/prose-sdk-js/src/client.rs +++ b/bindings/prose-sdk-js/src/client.rs @@ -256,6 +256,17 @@ impl Client { .into()) } + /// Destroys the room identified by `room_jid`. + #[wasm_bindgen(js_name = "destroyRoom")] + pub async fn destroy_room(&self, room_jid: &BareJid) -> Result<()> { + self.client + .rooms + .destroy_room(&RoomId::from(room_jid.clone())) + .await + .map_err(|err| WasmError::from(anyhow::Error::from(err)))?; + Ok(()) + } + /// XEP-0108: User Activity /// https://xmpp.org/extensions/xep-0108.html #[wasm_bindgen(js_name = "sendActivity")]