poll() bug fix.

write "Null" to Outbound object instead of empty String when the channel
is "Null".
This commit is contained in:
lunar-mining
2022-03-13 22:18:56 +01:00
parent e6dce6d3f7
commit 33f299f8c6

View File

@@ -201,7 +201,9 @@ async fn poll(client: Map, model: Arc<Model>) -> Result<()> {
if slot["channel"].is_null() {
// channel is empty. initialize with empty values
let state = &slot["state"];
let channel = Channel::new(String::new(), String::new());
let msg = "Null".to_string();
let status = "Null".to_string();
let channel = Channel::new(msg, status);
let new_slot =
Slot::new(String::new(), channel, state.as_str().unwrap().to_string());
slots.push(new_slot)