mirror of
https://github.com/binaricat/Netcatty.git
synced 2026-11-23 08:31:49 +00:00
fix(plugins): bind scoped Ask receipts and revoke advanced activations
This commit is contained in:
1 parent
643e71b17b
commit
2eee561847
25 files changed
+434
-35
No files matched your search
@@ -126,9 +126,12 @@ class PluginManager {
|
||||
});
|
||||
}
|
||||
|
||||
setEnabled(pluginId, enabled) {
|
||||
setEnabled(pluginId, enabled, options = {}) {
|
||||
return this.#mutate(async () => {
|
||||
await this.#ready();
|
||||
if (options.expectedSourceOwner !== undefined && this.database.privateOwner(pluginId) !== options.expectedSourceOwner) {
|
||||
throw new Error("Plugin source changed before its lifecycle update");
|
||||
}
|
||||
if (enabled) {
|
||||
const plugin = this.database.getActivePlugin(pluginId);
|
||||
if (plugin) await this.packageStore.assertCompatible?.(plugin);
|
||||
|
||||
Reference in new issue
Block a user