Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
import/slack: Don't convert integration bot into normal user.
PieterCK212657f69c58
diff --git a/zerver/data_import/slack.py b/zerver/data_import/slack.pyindex 6610cd94b2c..a51a766e614 100644--- a/zerver/data_import/slack.py+++ b/zerver/data_import/slack.py@@ -1544,6 +1544,7 @@ def convert_bot_info_to_slack_user(bot_info: dict[str, Any]) -> ZerverFieldsT:"is_mirror_dummy": False,"real_name": bot_info["name"],"is_integration_bot": True,+ "is_bot": True,"profile": {"bot_id": bot_info["id"],"first_name": bot_info["name"],diff --git a/zerver/tests/test_slack_importer.py b/zerver/tests/test_slack_importer.pyindex 07de67f3bb5..eebb0b89628 100644--- a/zerver/tests/test_slack_importer.py+++ b/zerver/tests/test_slack_importer.py@@ -802,6 +802,7 @@ class SlackImporter(ZulipTestCase):"is_mirror_dummy": False,"real_name": "Integration Bot","is_integration_bot": True,+ "is_bot": True,"profile": {"image_72": "https://avatars.slack-edge.com/2024-05-01/7057208497908_a4351f6deb91094eac4c_512.png","bot_id": "B06NWMNUQ3W",@@ -818,6 +819,7 @@ class SlackImporter(ZulipTestCase):"is_mirror_dummy": False,"real_name": "Unknown Bot","is_integration_bot": True,+ "is_bot": True,"profile": {"image_72": "https://avatars.slack-edge.com/2024-05-01/dasdasdasdasdXXXXXX","bot_id": "B0DSAMNUQ3W",@@ -984,12 +986,16 @@ class SlackImporter(ZulipTestCase):)self.assertEqual(zerver_userprofile[9]["is_active"], True)self.assertEqual(zerver_userprofile[9]["avatar_source"], "U")+ self.assertEqual(zerver_userprofile[9]["is_bot"], True)+ self.assertEqual(zerver_userprofile[9]["bot_type"], UserProfile.DEFAULT_BOT)self.assertEqual(zerver_userprofile[10]["id"], test_slack_user_id_to_zulip_user_id["U1RDFEC90"])self.assertEqual(zerver_userprofile[10]["is_active"], True)self.assertEqual(zerver_userprofile[10]["avatar_source"], "J")+ self.assertEqual(zerver_userprofile[10]["is_bot"], True)+ self.assertEqual(zerver_userprofile[10]["bot_type"], UserProfile.DEFAULT_BOT)def test_build_defaultstream(self) -> None:realm_id = 1