Skip to content

Commit

Permalink
fix(ffi): Fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
jonasrichardrichter committed Dec 10, 2024
1 parent 4e3a888 commit 12794bc
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions bindings/matrix-sdk-ffi/src/room.rs
Original file line number Diff line number Diff line change
Expand Up @@ -385,16 +385,12 @@ impl Room {
/// * `event_type` - The type of the event to send.
///
/// * `content` - The content of the event to send encoded as JSON string.
pub async fn send_raw(
&self,
event_type: String,
content: String,
) -> Result<(), ClientError> {
pub async fn send_raw(&self, event_type: String, content: String) -> Result<(), ClientError> {
let content_json: serde_json::Value = serde_json::from_str(&content)
.map_err(|e| ClientError::Generic { msg: format!("Failed to parse JSON: {e}") })?;

self.inner.send_raw(&event_type, content_json).await?;

Ok(())
}

Expand Down

0 comments on commit 12794bc

Please sign in to comment.