fix(plugins): bind scoped Ask receipts and revoke advanced activations

This commit is contained in:
陈奇 committed 2026-10-27 03:17:53 +00:00
1 parent 643e71b17b
commit 2eee561847
25 files changed
+434 -35

No files matched your search

+4 -1
View File
@@ -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);