diff --git a/core/context_processors.py b/core/context_processors.py index 112c7e9c7..aea8943fe 100644 --- a/core/context_processors.py +++ b/core/context_processors.py @@ -22,6 +22,7 @@ def content(request): def assistant(request) -> dict: return { "assistant": { + "is_iframe": "iframe" in request.GET, "is_home": request.path == reverse("qfdmd:home"), "POSTHOG_KEY": settings.ASSISTANT["POSTHOG_KEY"], "MATOMO_ID": settings.ASSISTANT["MATOMO_ID"], diff --git a/templates/components/sidebar/sidebar.html b/templates/components/sidebar/sidebar.html index 0921c5ff5..e4b278202 100644 --- a/templates/components/sidebar/sidebar.html +++ b/templates/components/sidebar/sidebar.html @@ -11,6 +11,8 @@ > {% include "./embed/action.html" %} {% include "./share/action.html" %} - {% include "./email/action.html" %} + {% if not assistant.is_iframe %} + {% include "./email/action.html" %} + {% endif %}