Commit 155878d7b3
Unsigned
Layout: unified · split
src/room/mod.rs +1 −2
| @@ -734,8 +734,7 @@ impl MatrixRoom { | |||
| 734 | 734 | ||
| 735 | if let Some(connection) = connection { | 735 | if let Some(connection) = connection { |
| 736 | if let Ok(r) = connection.room_messages(room_id, prev_batch).await { | 736 | if let Ok(r) = connection.room_messages(room_id, prev_batch).await { |
| 737 | for event in | 737 | for event in r.chunk.iter().filter_map(|e| e.deserialize().ok()) |
| 738 | r.chunk.iter().filter_map(|e| e.deserialize().ok()) | ||
| 739 | { | 738 | { |
| 740 | self.handle_room_event(&event).await; | 739 | self.handle_room_event(&event).await; |
| 741 | } | 740 | } |
src/server.rs +6 −4
| @@ -713,10 +713,12 @@ impl InnerServer { | |||
| 713 | .expect("Receiving events without a client") | 713 | .expect("Receiving events without a client") |
| 714 | .get_joined_room(room_id); | 714 | .get_joined_room(room_id); |
| 715 | 715 | ||
| 716 | let room = room.unwrap_or_else(|| panic!( | 716 | let room = room.unwrap_or_else(|| { |
| 717 | "Receiving events for a room while no room found {}", | 717 | panic!( |
| 718 | room_id | 718 | "Receiving events for a room while no room found {}", |
| 719 | )); | 719 | room_id |
| 720 | ) | ||
| 721 | }); | ||
| 720 | let buffer = RoomHandle::new( | 722 | let buffer = RoomHandle::new( |
| 721 | &self.server_name, | 723 | &self.server_name, |
| 722 | &self.connection, | 724 | &self.connection, |