Expose API to allow refreshing all notification targets' state from the
PVE backend, as well as from pveupdate.

Signed-off-by: Arthur Bied-Charreton <[email protected]>
---
 src/PVE/Notify.pm | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/PVE/Notify.pm b/src/PVE/Notify.pm
index b44b5b3..d5bfaea 100644
--- a/src/PVE/Notify.pm
+++ b/src/PVE/Notify.pm
@@ -103,6 +103,12 @@ sub error {
     );
 }
 
+sub refresh_targets {
+    my ($config) = @_;
+    $config = read_config() if !defined($config);
+    $config->refresh_targets();
+}
+
 sub check_may_use_target {
     my ($target, $rpcenv) = @_;
     my $user = $rpcenv->get_user();
-- 
2.47.3



Reply via email to