Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
nesium committed Dec 19, 2023
1 parent 46e42c4 commit 8aa6b86
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions bindings/prose-sdk-js/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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")]
Expand Down

0 comments on commit 8aa6b86

Please sign in to comment.