From b03003a910f76c4467a06ab3544c958a9f78aaa0 Mon Sep 17 00:00:00 2001 From: doge Date: Fri, 1 Jul 2022 23:05:24 +0800 Subject: [PATCH] fix: Unable to trigger notification --- client/src/main.rs | 3 ++- client/stat_client.py | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/client/src/main.rs b/client/src/main.rs index 664c3ed8..c718733d 100644 --- a/client/src/main.rs +++ b/client/src/main.rs @@ -271,6 +271,7 @@ async fn main() -> Result<()> { online6: ipv6, vnstat: args.vnstat, weight: args.weight, + notify: true, version: env!("CARGO_PKG_VERSION").to_string(), ..Default::default() }; @@ -286,7 +287,7 @@ async fn main() -> Result<()> { } } if args.disable_notify { - stat_base.notify = args.disable_notify; + stat_base.notify = false; } if !args.host_type.is_empty() { stat_base.r#type = args.host_type.to_owned(); diff --git a/client/stat_client.py b/client/stat_client.py index ec30b3aa..2e30d057 100644 --- a/client/stat_client.py +++ b/client/stat_client.py @@ -527,6 +527,7 @@ def main(): stat_base['name'] = options.username stat_base['weight'] = options.weight stat_base['vnstat'] = options.vnstat + stat_base['notify'] = True if len(options.gid) > 0: stat_base["gid"] = options.gid