FIX: Hide related topics when module is disabled (#461)

This commit is contained in:
Roman Rizzi 2024-02-05 11:45:24 -03:00 committed by GitHub
parent ba3c3951cf
commit 8bd8280427
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 1 deletions

View File

@ -6,7 +6,10 @@ export default {
initialize(container) {
const settings = container.lookup("service:site-settings");
if (settings.ai_embeddings_semantic_related_topics_enabled) {
if (
settings.ai_embeddings_enabled &&
settings.ai_embeddings_semantic_related_topics_enabled
) {
withPluginApi("1.1.0", (api) => {
api.modifyClass("model:post-stream", {
pluginId: "discourse-ai",