hotfix netsync

This commit is contained in:
kirillius 2025-06-05 14:29:35 +03:00
parent a3909860d2
commit e8f1eb27b6
1 changed files with 7 additions and 0 deletions

View File

@ -58,6 +58,11 @@ class Netsync extends Plugin
if (count($diff) > 0) {
$wrapper["networks"] = array_values($remote_enabled);
$wrapper->save();
}
$last_hash = $this->config["last_hash"] ?? "";
$current_hash = md5(json_encode($remote_config));
if ($last_hash != $current_hash) {
foreach ($this->context->getRPC()->getPlugins() as $plugin) {
/**
* @var IPluggable $plugin
@ -65,6 +70,8 @@ class Netsync extends Plugin
$plugin->onSync($remote_config);
}
$this->config["last_hash"] = $current_hash;
$this->saveConfig();
}
return $diff;