Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

import_util: Include attachment url in AttachmentLinkResult.

PieterCKd90ef8d7cb29
diff --git a/zerver/data_import/import_util.py b/zerver/data_import/import_util.py
index 119f23e3203..573fa03f1ca 100644
--- a/zerver/data_import/import_util.py
+++ b/zerver/data_import/import_util.py
@@ -55,6 +55,7 @@ ZerverFieldsT: TypeAlias = dict[str, Any]
class AttachmentLinkResult:
path_id: str
markdown_link: str
+ url: str
@dataclass
@@ -926,7 +927,7 @@ def get_attachment_path_and_content(
attachment_url = f"/user_uploads/{path_id}"
markdown_link = get_markdown_link_for_url(link_name, attachment_url)
- return AttachmentLinkResult(path_id=path_id, markdown_link=markdown_link)
+ return AttachmentLinkResult(path_id=path_id, markdown_link=markdown_link, url=attachment_url)
def get_domain_name_for_import() -> str: