mirror of https://github.com/zulip/zulip.git
email_mirror: Move ZulipEmailForwardUserError into email_mirror_helpers.
This commit is contained in:
parent
621d0e5123
commit
be669c8d98
|
@ -17,6 +17,7 @@ from zerver.lib.actions import (
|
|||
)
|
||||
from zerver.lib.email_mirror_helpers import (
|
||||
ZulipEmailForwardError,
|
||||
ZulipEmailForwardUserError,
|
||||
decode_email_address,
|
||||
get_email_gateway_message_string_from_address,
|
||||
)
|
||||
|
@ -199,10 +200,6 @@ def construct_zulip_body(
|
|||
## Sending the Zulip ##
|
||||
|
||||
|
||||
class ZulipEmailForwardUserError(ZulipEmailForwardError):
|
||||
pass
|
||||
|
||||
|
||||
def send_zulip(sender: UserProfile, stream: Stream, topic: str, content: str) -> None:
|
||||
internal_send_stream_message(
|
||||
sender,
|
||||
|
|
|
@ -27,6 +27,10 @@ class ZulipEmailForwardError(Exception):
|
|||
pass
|
||||
|
||||
|
||||
class ZulipEmailForwardUserError(ZulipEmailForwardError):
|
||||
pass
|
||||
|
||||
|
||||
def get_email_gateway_message_string_from_address(address: str) -> str:
|
||||
pattern_parts = [re.escape(part) for part in settings.EMAIL_GATEWAY_PATTERN.split("%s")]
|
||||
if settings.EMAIL_GATEWAY_EXTRA_PATTERN_HACK:
|
||||
|
|
Loading…
Reference in New Issue