mirror of
https://github.com/zulip/zulip.git
synced 2025-11-14 19:06:09 +00:00
email_mirror: Clean up EMAIL_GATEWAY_EXAMPLE setting.
This isn't something that a user can ever modify, so it doesn't belong in DEFAULT_SETTINGS. While we're at it, we align the appearance of the email gateway in the docs with whether this setting in the docs will be valid.
This commit is contained in:
@@ -133,7 +133,7 @@ class BotIntegration(Integration):
|
|||||||
class EmailIntegration(Integration):
|
class EmailIntegration(Integration):
|
||||||
def is_enabled(self):
|
def is_enabled(self):
|
||||||
# type: () -> bool
|
# type: () -> bool
|
||||||
return settings.EMAIL_GATEWAY_BOT != ""
|
return settings.EMAIL_GATEWAY_PATTERN != ""
|
||||||
|
|
||||||
class WebhookIntegration(Integration):
|
class WebhookIntegration(Integration):
|
||||||
DEFAULT_FUNCTION_PATH = 'zerver.webhooks.{name}.view.api_{name}_webhook'
|
DEFAULT_FUNCTION_PATH = 'zerver.webhooks.{name}.view.api_{name}_webhook'
|
||||||
|
|||||||
@@ -191,7 +191,6 @@ DEFAULT_SETTINGS.update({
|
|||||||
# These are undocumented, and we don't set them in dev_settings.py
|
# These are undocumented, and we don't set them in dev_settings.py
|
||||||
# or test_settings.py , either.
|
# or test_settings.py , either.
|
||||||
# TODO: document them.
|
# TODO: document them.
|
||||||
'EMAIL_GATEWAY_EXAMPLE': '',
|
|
||||||
'EMAIL_GATEWAY_PASSWORD': None,
|
'EMAIL_GATEWAY_PASSWORD': None,
|
||||||
'EMAIL_GATEWAY_EXTRA_PATTERN_HACK': None,
|
'EMAIL_GATEWAY_EXTRA_PATTERN_HACK': None,
|
||||||
'STAGING': False,
|
'STAGING': False,
|
||||||
@@ -562,6 +561,8 @@ for bot in INTERNAL_BOTS:
|
|||||||
|
|
||||||
if EMAIL_GATEWAY_PATTERN != "":
|
if EMAIL_GATEWAY_PATTERN != "":
|
||||||
EMAIL_GATEWAY_EXAMPLE = EMAIL_GATEWAY_PATTERN % ("support+abcdefg",)
|
EMAIL_GATEWAY_EXAMPLE = EMAIL_GATEWAY_PATTERN % ("support+abcdefg",)
|
||||||
|
else:
|
||||||
|
EMAIL_GATEWAY_EXAMPLE = ""
|
||||||
|
|
||||||
DEPLOYMENT_ROLE_KEY = get_secret("deployment_role_key")
|
DEPLOYMENT_ROLE_KEY = get_secret("deployment_role_key")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user