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: Skip reactions for deleted users.

Matt Keller958b58f174d6
diff --git a/zerver/data_import/slack.py b/zerver/data_import/slack.py
index 03bfce7e408..153c8cfcf90 100755
--- a/zerver/data_import/slack.py
+++ b/zerver/data_import/slack.py
@@ -1146,6 +1146,10 @@ def build_reactions(
continue
for slack_user_id in slack_reaction["users"]:
+ if slack_user_id not in slack_user_id_to_zulip_user_id:
+ # Deleted users still have reaction references but no profile, so we skip
+ continue
+
reaction_id = NEXT_ID("reaction")
reaction = Reaction(
id=reaction_id,