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_import: Fix thread conversion condition.

PieterCKd5e28bcd28bd
diff --git a/zerver/data_import/slack.py b/zerver/data_import/slack.py
index 2d2d11d31b8..f0acc0c9c03 100644
--- a/zerver/data_import/slack.py
+++ b/zerver/data_import/slack.py
@@ -1005,7 +1005,7 @@ def channel_message_to_zerver_message(
# threads each generate a unique topic labeled by the date and
# a counter among topics on that day.
topic_name = "imported from Slack"
- if convert_slack_threads and "thread_ts" in message:
+ if convert_slack_threads and not is_direct_message_type and "thread_ts" in message:
thread_ts = datetime.fromtimestamp(float(message["thread_ts"]), tz=timezone.utc)
thread_ts_str = thread_ts.strftime(r"%Y/%m/%d %H:%M:%S")
# The topic name is "2015-08-18 Slack thread 2", where the counter at the end is to disambiguate