mirror of https://github.com/zulip/zulip.git
send_email: Remove unnecessary send_email_from_dict.
This was introduced in 8321bd3f92
to serve as a sort of drop-in
replacement for zerver.lib.queue.queue_json_publish, but its use has
been subsequently cut out (e.g. `9fcdb6c83ac5`).
Remote its last callsite.
This commit is contained in:
parent
4f716d4ad8
commit
0ad17925eb
|
@ -227,10 +227,6 @@ def send_email(
|
||||||
raise EmailNotDeliveredException
|
raise EmailNotDeliveredException
|
||||||
|
|
||||||
|
|
||||||
def send_email_from_dict(email_dict: Mapping[str, Any]) -> None:
|
|
||||||
send_email(**dict(email_dict))
|
|
||||||
|
|
||||||
|
|
||||||
def send_future_email(
|
def send_future_email(
|
||||||
template_prefix: str,
|
template_prefix: str,
|
||||||
realm: Realm,
|
realm: Realm,
|
||||||
|
|
|
@ -82,7 +82,7 @@ from zerver.lib.send_email import (
|
||||||
EmailNotDeliveredException,
|
EmailNotDeliveredException,
|
||||||
FromAddress,
|
FromAddress,
|
||||||
handle_send_email_format_changes,
|
handle_send_email_format_changes,
|
||||||
send_email_from_dict,
|
send_email,
|
||||||
send_future_email,
|
send_future_email,
|
||||||
)
|
)
|
||||||
from zerver.lib.timestamp import timestamp_to_datetime
|
from zerver.lib.timestamp import timestamp_to_datetime
|
||||||
|
@ -613,13 +613,13 @@ class EmailSendingWorker(QueueProcessingWorker):
|
||||||
@retry_send_email_failures
|
@retry_send_email_failures
|
||||||
def consume(self, event: Dict[str, Any]) -> None:
|
def consume(self, event: Dict[str, Any]) -> None:
|
||||||
# Copy the event, so that we don't pass the `failed_tries'
|
# Copy the event, so that we don't pass the `failed_tries'
|
||||||
# data to send_email_from_dict (which neither takes that
|
# data to send_email (which neither takes that
|
||||||
# argument nor needs that data).
|
# argument nor needs that data).
|
||||||
copied_event = copy.deepcopy(event)
|
copied_event = copy.deepcopy(event)
|
||||||
if "failed_tries" in copied_event:
|
if "failed_tries" in copied_event:
|
||||||
del copied_event["failed_tries"]
|
del copied_event["failed_tries"]
|
||||||
handle_send_email_format_changes(copied_event)
|
handle_send_email_format_changes(copied_event)
|
||||||
send_email_from_dict(copied_event)
|
send_email(**copied_event)
|
||||||
|
|
||||||
|
|
||||||
@assign_queue("missedmessage_mobile_notifications")
|
@assign_queue("missedmessage_mobile_notifications")
|
||||||
|
|
Loading…
Reference in New Issue