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.

slack_importer: Fix how thread topic link syntax is computed.

PieterCK2a5953c4ae9b
diff --git a/zerver/data_import/slack.py b/zerver/data_import/slack.py
index 95c0b01e750..6610cd94b2c 100644
--- a/zerver/data_import/slack.py
+++ b/zerver/data_import/slack.py
@@ -1123,12 +1123,12 @@ def get_thread_reply_notification(
def create_topic_name_for_message(
+ added_channels: AddedChannelsT,
channel_name: str | None,
content: str,
convert_slack_threads: bool,
is_direct_message_type: bool,
message: ZerverFieldsT,
- recipient_id: int,
thread_counter: dict[str, int],
thread_map: dict[str, ThreadMetadata],
) -> str:
@@ -1155,9 +1155,9 @@ def create_topic_name_for_message(
thread_map[thread_key] = ThreadMetadata(
topic_link_syntax=get_stream_topic_link_syntax(
- recipient_id,
- channel_name,
- thread_topic_name,
+ stream_id=added_channels[channel_name][1],
+ stream_name=channel_name,
+ topic_name=thread_topic_name,
),
topic_name=thread_topic_name,
)
@@ -1275,12 +1275,12 @@ def channel_message_to_zerver_message(
has_image = file_info["has_image"]
topic_name = create_topic_name_for_message(
+ added_channels=added_channels,
channel_name=channel_name,
content=content,
convert_slack_threads=convert_slack_threads,
is_direct_message_type=is_direct_message_type,
message=message,
- recipient_id=recipient_id,
thread_counter=thread_counter,
thread_map=thread_map,
)