xmpp: Replace unimplemented! and panic! with info! calls
It's great for debugging for fast-paced implementations but the codebase has been more or less the same for years now (in a state we don't exactly like, but it is what it is) and this is hindering things more than helping. Keep it at the INFO level nonetheless to make it more or less obvious these things are not implemented. Signed-off-by: pep <pep@bouah.net>
This commit is contained in:
parent
58ed1592f0
commit
22292c86cc
5 changed files with 13 additions and 8 deletions
|
|
@ -28,6 +28,8 @@ XXXX-YY-ZZ [ RELEASER <admin@localhost> ]
|
|||
Please refer to the crate docs for details. (!581)
|
||||
- Allow joining an already joined room with `Agent::join_room` to enable
|
||||
resyncs. Adds a parameter to `muc::room::JoinRoomSettings`.
|
||||
* Changed:
|
||||
- Replaced unimplemented! with info! calls.
|
||||
* Added:
|
||||
- Agent::send_room_message takes RoomMessageSettings argument (!483)
|
||||
- Agent::send_raw_message takes RawMessageSettings for any message type (!487)
|
||||
|
|
|
|||
|
|
@ -48,6 +48,6 @@ pub async fn handle_disco_info_result(agent: &mut Agent, disco: DiscoInfoResult,
|
|||
let _ = agent.client.send_stanza(iq).await;
|
||||
}
|
||||
} else {
|
||||
unimplemented!("Ignored disco#info response from {}", from);
|
||||
info!("Ignored disco#info response from {}", from);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ pub async fn handle_iq_result(
|
|||
}
|
||||
}
|
||||
Err(e) => {
|
||||
panic!("Wrong XEP-0048 v1.0 Bookmark format: {}", e);
|
||||
info!("Wrong XEP-0048 v1.0 Bookmark format: {}", e);
|
||||
}
|
||||
}
|
||||
} else if payload.is("query", ns::DISCO_INFO) {
|
||||
|
|
@ -58,7 +58,7 @@ pub async fn handle_iq_result(
|
|||
disco::handle_disco_info_result(agent, disco, from).await;
|
||||
}
|
||||
Err(e) => match e {
|
||||
_ => panic!("Wrong disco#info format: {}", e),
|
||||
_ => info!("Wrong disco#info format: {}", e),
|
||||
},
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -58,7 +58,10 @@ pub async fn handle_presence(agent: &mut Agent, presence: Presence) -> Vec<Event
|
|||
}
|
||||
events.push(Event::RoomLeft(from.clone()));
|
||||
}
|
||||
_ => unimplemented!("Presence type {:?}", presence.type_), // TODO: What to do here?
|
||||
_ => debug!(
|
||||
"Unhandled self-presence with type {:?} from {:?}",
|
||||
presence.type_, from
|
||||
),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@ pub(crate) async fn handle_event(
|
|||
error!("No published or retracted item in pubsub event!");
|
||||
}
|
||||
}
|
||||
ref node => unimplemented!("node {}", node),
|
||||
ref node => info!("Unhandled PubSub node {}", node),
|
||||
}
|
||||
}
|
||||
Ok(pubsub::Event {
|
||||
|
|
@ -95,12 +95,12 @@ pub(crate) async fn handle_event(
|
|||
ref node if node == ns::BOOKMARKS2 => {
|
||||
warn!("The bookmarks2 PEP node was deleted!");
|
||||
}
|
||||
ref node => unimplemented!("node {}", node),
|
||||
ref node => info!("Unhandled PubSub node {}", node),
|
||||
},
|
||||
Err(e) => {
|
||||
error!("Error parsing PubSub event: {}", e);
|
||||
}
|
||||
_ => unimplemented!("PubSub event: {:#?}", event),
|
||||
_ => info!("Unhandled PubSub event: {:#?}", event),
|
||||
}
|
||||
events
|
||||
}
|
||||
|
|
@ -176,7 +176,7 @@ pub(crate) async fn handle_iq_result(
|
|||
}
|
||||
}
|
||||
}
|
||||
_ => unimplemented!(),
|
||||
ref node => info!("Unhandled PubSub node: {}", node),
|
||||
}
|
||||
}
|
||||
events
|
||||
|
|
|
|||
Loading…
Reference in a new issue