mirror of
https://github.com/csehviktor/status-monitor.git
synced 2026-04-28 16:27:34 +02:00
update serialization
This commit is contained in:
@@ -27,8 +27,7 @@ impl MqttSubscriber {
|
||||
if let Notification::Forward(forward) = notification.unwrap() {
|
||||
let payload = StatusMessage::try_from(&forward.publish.payload[..])?;
|
||||
|
||||
if let Ok(payload_str) = payload.to_string() {
|
||||
self.clients.broadcast(payload_str).await;
|
||||
self.clients.broadcast(&payload).await;
|
||||
|
||||
if let Err(e) = self.storage.record_message(&payload.agent).await {
|
||||
eprintln!("failed to record message for {}: {}", &payload.agent, e);
|
||||
|
||||
Reference in New Issue
Block a user