Log payload
All checks were successful
/ build-container (push) Successful in 5m24s

This commit is contained in:
Finn 2024-10-17 00:08:14 -07:00
parent 008f7cdc08
commit 7dc750d68b

View file

@ -56,7 +56,7 @@ impl MeshtasticClient {
match payload_variant {
PayloadVariant::Packet(packet) => {
let payload_variant = match packet.payload_variant {
let payload_variant = match &packet.payload_variant {
Some(payload_variant) => payload_variant,
None => {
log::debug!(
@ -68,7 +68,7 @@ impl MeshtasticClient {
match payload_variant {
mesh_packet::PayloadVariant::Decoded(decoded) => {
handle_decoded_packet(&matrix_sender, decoded).await?;
handle_decoded_packet(&matrix_sender, &packet, decoded).await?;
}
mesh_packet::PayloadVariant::Encrypted(encrypted) => {
log::debug!(
@ -113,11 +113,13 @@ impl MeshtasticClient {
async fn handle_decoded_packet(
matrix_sender: &Sender<RoomMessageEventContent>,
// packet: MeshPacket,
decoded: Data,
packet: &meshtastic::protobufs::MeshPacket,
decoded: &Data,
) -> Result<(), Box<dyn std::error::Error>> {
match decoded.portnum() {
meshtastic::protobufs::PortNum::TextMessageApp => {
log::debug!("posting packet to matrix: {:?}", packet);
log::debug!("decoded: {:?}", decoded);
debug_message(
&matrix_sender,
format!(