Skip to content

Commit

Permalink
refactor(crypto): Use our own type for megolm
Browse files Browse the repository at this point in the history
  • Loading branch information
poljar committed Jul 28, 2022
1 parent b8ad55f commit 8a53180
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/machine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@
use std::collections::BTreeMap;

use js_sys::{Array, Map, Promise, Set};
use ruma::{
events::room::encrypted::OriginalSyncRoomEncryptedEvent, DeviceKeyAlgorithm,
OwnedTransactionId, UInt,
};
use ruma::{serde::Raw, DeviceKeyAlgorithm, OwnedTransactionId, UInt};
use serde_json::Value as JsonValue;
use wasm_bindgen::prelude::*;

Expand Down Expand Up @@ -274,7 +271,7 @@ impl OlmMachine {
event: &str,
room_id: &identifiers::RoomId,
) -> Result<Promise, JsError> {
let event: OriginalSyncRoomEncryptedEvent = serde_json::from_str(event)?;
let event: Raw<_> = serde_json::from_str(event)?;
let room_id = room_id.inner.clone();
let me = self.inner.clone();

Expand Down

0 comments on commit 8a53180

Please sign in to comment.