mirror of
https://github.com/zulip/zulip.git
synced 2025-11-02 04:53:36 +00:00
When this code was moved from being in zerver in21a2fd482e, it kept the `if ZILENCER_ENABLED` blocks. Since ZILENCER and CORPORATE are generally either both on or both off, the if statement became mostly-unnecessary. However, because tests cannot easily remove elements from INSTALLED_APPS and re-determine URL resolution, we switch to checking `if CORPORATE_ENABLED` as a guard, and leave these in-place. The other side effect of this is that withe54ded49c4, most Zulip deployments started to 404 requests for `/apps` instead of redirecting them to `https://zulip.com/apps/` since they no longer had any path configured for `/apps`. Unfortunately, this URL is in widespread use in the app (e.g. in links from the Welcome Bot), so we should ensure that it does successfully redirect. Add the `/apps` path to `zerver`, but only if not CORPORATE_ENABLED, so the URLs do not overlap.