mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 05:23:35 +00:00
slack_import: Strip port from "domain_name".
This lets slack conversions be done on development hosts, which have a trailing :9991 on their EXTERNAL_HOST; otherwise, we generate fake emails like `imported-slack-bot@host.name:9991` which fail to validate.
This commit is contained in:
committed by
Tim Abbott
parent
e68096c907
commit
2c51824b7d
@@ -12,7 +12,7 @@ from collections.abc import Iterator
|
||||
from datetime import datetime, timezone
|
||||
from email.headerregistry import Address
|
||||
from typing import Any, TypeAlias, TypeVar
|
||||
from urllib.parse import urlsplit
|
||||
from urllib.parse import SplitResult, urlsplit
|
||||
|
||||
import orjson
|
||||
import requests
|
||||
@@ -1442,7 +1442,8 @@ def do_convert_directory(
|
||||
# Subdomain is set by the user while running the import command
|
||||
realm_subdomain = ""
|
||||
realm_id = 0
|
||||
domain_name = settings.EXTERNAL_HOST
|
||||
domain_name = SplitResult("", settings.EXTERNAL_HOST, "", "", "").hostname
|
||||
assert isinstance(domain_name, str)
|
||||
|
||||
(
|
||||
realm,
|
||||
|
||||
Reference in New Issue
Block a user