whatsapp_rust/handlers/
receipt.rs1use super::traits::StanzaHandler;
2use crate::client::Client;
3use async_trait::async_trait;
4use std::sync::Arc;
5use wacore_binary::node::Node;
6
7#[derive(Default)]
14pub struct ReceiptHandler;
15
16impl ReceiptHandler {
17 pub fn new() -> Self {
18 Self
19 }
20}
21
22#[async_trait]
23impl StanzaHandler for ReceiptHandler {
24 fn tag(&self) -> &'static str {
25 "receipt"
26 }
27
28 async fn handle(&self, client: Arc<Client>, node: &Node, _cancelled: &mut bool) -> bool {
29 client.handle_receipt(node).await;
30 true
31 }
32}