notifications: Rename notifications.py to email_notifications.py.

This library is entirely about email notifications specifically, and
this rename should help make the codebase more readable.
This commit is contained in:
Tim Abbott 2019-03-15 10:51:39 -07:00
parent 28a4c143c8
commit 50dc317466
13 changed files with 12 additions and 12 deletions

View File

@ -65,7 +65,7 @@ not_yet_fully_covered = {path for target in [
'zerver/lib/cache.py',
'zerver/lib/cache_helpers.py',
'zerver/lib/i18n.py',
'zerver/lib/notifications.py',
'zerver/lib/email_notifications.py',
'zerver/lib/send_email.py',
'zerver/lib/webhooks/common.py',
'zerver/lib/url_preview/preview.py',

View File

@ -138,7 +138,7 @@ from zerver.lib.utils import log_statsd_event, statsd
from zerver.lib.i18n import get_language_name
from zerver.lib.alert_words import add_user_alert_words, \
remove_user_alert_words, set_user_alert_words
from zerver.lib.notifications import enqueue_welcome_emails
from zerver.lib.email_notifications import enqueue_welcome_emails
from zerver.lib.exceptions import JsonableError, ErrorCode, BugdownRenderingException
from zerver.lib.sessions import delete_user_sessions
from zerver.lib.upload import attachment_url_re, attachment_url_to_path_id, \

View File

@ -10,7 +10,7 @@ from django.conf import settings
from django.utils.timezone import now as timezone_now
from confirmation.models import one_click_unsubscribe_link
from zerver.lib.notifications import build_message_list
from zerver.lib.email_notifications import build_message_list
from zerver.lib.send_email import send_future_email, FromAddress
from zerver.lib.url_encoding import encode_stream
from zerver.models import UserProfile, UserMessage, Recipient, \

View File

@ -13,7 +13,7 @@ from zerver.lib.actions import decode_email_address, get_email_gateway_message_s
internal_send_message, internal_send_private_message, \
internal_send_stream_message, internal_send_huddle_message, \
truncate_body, truncate_topic
from zerver.lib.notifications import convert_html_to_markdown
from zerver.lib.email_notifications import convert_html_to_markdown
from zerver.lib.queue import queue_json_publish
from zerver.lib.redis_utils import get_redis_client
from zerver.lib.upload import upload_message_file

View File

@ -33,7 +33,7 @@ from zerver.lib.email_mirror import (
is_forwarded,
)
from zerver.lib.notifications import convert_html_to_markdown
from zerver.lib.email_notifications import convert_html_to_markdown
from zerver.lib.send_email import FromAddress
from email.mime.text import MIMEText

View File

@ -16,7 +16,7 @@ from zerver.lib.test_classes import (
ZulipTestCase,
)
from zerver.management.commands import makemessages
from zerver.lib.notifications import enqueue_welcome_emails
from zerver.lib.email_notifications import enqueue_welcome_emails
class EmailTranslationTestCase(ZulipTestCase):
def test_email_translation(self) -> None:

View File

@ -11,7 +11,7 @@ from email.utils import formataddr
from mock import patch, MagicMock
from typing import List, Optional
from zerver.lib.notifications import fix_emojis, handle_missedmessage_emails, \
from zerver.lib.email_notifications import fix_emojis, handle_missedmessage_emails, \
enqueue_welcome_emails, relative_to_full_url
from zerver.lib.actions import do_change_notification_settings
from zerver.lib.test_classes import ZulipTestCase

View File

@ -165,7 +165,7 @@ class WorkerTest(ZulipTestCase):
)
send_mock = patch(
'zerver.lib.notifications.do_send_missedmessage_events_reply_in_zulip'
'zerver.lib.email_notifications.do_send_missedmessage_events_reply_in_zulip'
)
mmw.BATCH_DURATION = 0

View File

@ -50,7 +50,7 @@ from zerver.lib.actions import (
)
from zerver.lib.mobile_auth_otp import xor_hex_strings, ascii_to_hex, \
otp_encrypt_api_key, is_valid_otp, hex_to_ascii, otp_decrypt_api_key
from zerver.lib.notifications import enqueue_welcome_emails, \
from zerver.lib.email_notifications import enqueue_welcome_emails, \
followup_day2_email_delay
from zerver.lib.subdomains import is_root_domain_available
from zerver.lib.stream_subscription import get_stream_subscriptions_for_user

View File

@ -6,7 +6,7 @@ from django.views.decorators.http import require_GET
from zerver.models import (
get_realm, get_user_by_delivery_email, get_realm_stream, Realm,
)
from zerver.lib.notifications import enqueue_welcome_emails
from zerver.lib.email_notifications import enqueue_welcome_emails
from zerver.lib.response import json_success
from zerver.lib.actions import do_change_user_delivery_email, \
do_send_realm_reactivation_email

View File

@ -7,7 +7,7 @@ from django.http import HttpRequest, HttpResponse
from django.utils.translation import ugettext as _
from zerver.decorator import authenticated_rest_api_view
from zerver.lib.notifications import convert_html_to_markdown
from zerver.lib.email_notifications import convert_html_to_markdown
from zerver.lib.request import REQ, has_request_variables
from zerver.lib.response import json_error, json_success
from zerver.lib.webhooks.common import check_send_webhook_message

View File

@ -22,7 +22,7 @@ from zerver.lib.error_notify import do_report_error
from zerver.lib.feedback import handle_feedback
from zerver.lib.queue import SimpleQueueClient, queue_json_publish, retry_event
from zerver.lib.timestamp import timestamp_to_datetime
from zerver.lib.notifications import handle_missedmessage_emails
from zerver.lib.email_notifications import handle_missedmessage_emails
from zerver.lib.push_notifications import handle_push_notification, handle_remove_push_notification, \
initialize_push_notifications
from zerver.lib.actions import do_send_confirmation_email, \