Signal KSK
Signal K7mo ago
11 replies
naugehyde

naugehyde - API question (for @Teppo Kurki ? @S...

API question (for @Teppo Kurki ? @Scott Bender ?): How does a plugin developer save the "enabled" = true key for a plugin's json? ServerAPI::savePluginOptions only saves the configuration not the plugins enabled and debug state.

This becomes a problem when a plugin manages its own configuration state in a custom panel AND is enabled by default.

Under such circumstances, the configuration is never properly enabled (even though its enabled by default) and therefore every time the user restarts, the configuration the plugin gets on startup appears empty. (See interfaces/plugins.ts:576)

I realize this is an edge case but in the case of my bluetooth plugin, I can't find a non-hacky way to ensure that the enabled state is stored in the plugin json. There are only awkward and counter-intuitive end user workarounds (saving the config then disabling/re-enabling or turning debug on and off).

Thanks for any help.
Was this page helpful?