Fix euph errors always turning into conn::Errors
This commit is contained in:
parent
0c135844a4
commit
0f217a6279
2 changed files with 5 additions and 3 deletions
|
|
@ -31,6 +31,7 @@ Procedure when bumping the version number:
|
|||
- **(breaking)** Deserializing empty events and replies by turning unit structs into empty structs
|
||||
- `phone` and `mobile` emoji
|
||||
- Instances getting stuck in "Connecting" state
|
||||
- Euph errors always turning into `conn::Error`s
|
||||
|
||||
## v0.3.1 - 2023-02-26
|
||||
|
||||
|
|
|
|||
|
|
@ -444,10 +444,11 @@ impl Conn {
|
|||
self.replies.complete(id, packet.clone());
|
||||
}
|
||||
|
||||
match &packet.content {
|
||||
Ok(data) => self.on_data(&packet.id, data).await,
|
||||
Err(msg) => Err(Error::Euph(msg.clone())),
|
||||
if let Ok(data) = &packet.content {
|
||||
self.on_data(&packet.id, data).await?;
|
||||
}
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
async fn on_data(&mut self, id: &Option<String>, data: &Data) -> Result<()> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue