mirror of
https://github.com/zulip/zulip.git
synced 2025-10-29 19:13:53 +00:00
email: Replace uri with url in templates and backend.
In #23380 we want to change all ocurrences of `uri` to `url`. This commit changes the ocurrences of `uri` appeared in files related to email, including templates (`.html`, `.txt`) and backend (`.py`) codes. In `email.md`, `base_images_uri` is changed to `images_base_url` - the words `base` and `images` are swapped and plural form is added for `image`. This is becasue the former is not found anywhere in the codebase while the later appears a lot. To reduce confusion, this doccumentation changed accordingly.
This commit is contained in:
@@ -66,8 +66,8 @@ class EmailLogBackEnd(EmailBackend):
|
||||
|
||||
@staticmethod
|
||||
def prepare_email_messages_for_forwarding(email_messages: Sequence[EmailMessage]) -> None:
|
||||
localhost_email_images_base_uri = settings.ROOT_DOMAIN_URI + "/static/images/emails"
|
||||
czo_email_images_base_uri = "https://chat.zulip.org/static/images/emails"
|
||||
localhost_email_images_base_url = settings.ROOT_DOMAIN_URI + "/static/images/emails"
|
||||
czo_email_images_base_url = "https://chat.zulip.org/static/images/emails"
|
||||
|
||||
for email_message in email_messages:
|
||||
assert isinstance(email_message, EmailMultiAlternatives)
|
||||
@@ -77,7 +77,7 @@ class EmailLogBackEnd(EmailBackend):
|
||||
# will be able to fetch the illustrations used in the emails.
|
||||
html_alternative = (
|
||||
email_message.alternatives[0][0].replace(
|
||||
localhost_email_images_base_uri, czo_email_images_base_uri
|
||||
localhost_email_images_base_url, czo_email_images_base_url
|
||||
),
|
||||
email_message.alternatives[0][1],
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user