diff --git a/matrix_sdk/examples/wasm_command_bot/src/lib.rs b/matrix_sdk/examples/wasm_command_bot/src/lib.rs index e7e8c0e5..7f4abbb4 100644 --- a/matrix_sdk/examples/wasm_command_bot/src/lib.rs +++ b/matrix_sdk/examples/wasm_command_bot/src/lib.rs @@ -58,7 +58,7 @@ impl WasmBot { for (room_id, room) in response.rooms.join { for event in room.timeline.events { - if let AnySyncRoomEvent::Message(AnySyncMessageEvent::RoomMessage(ev)) = event { + if let Ok(AnySyncRoomEvent::Message(AnySyncMessageEvent::RoomMessage(ev))) = event.event.deserialize() { self.on_room_message(&room_id, &ev).await } }