Commit 155878d7b3

155878d7b3e35d7bb282e2010d6037d45c8899d6

parent: 7f9fb46be5

Unsigned

Damir Jelić <poljar@termina.org.uk> · 2021-01-02 13:56 UTC

weechat-matrix: Format the repo.

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,