mirror of
https://github.com/zulip/zulip.git
synced 2025-11-04 22:13:26 +00:00
export: Include huddles subscription from mirrordummy users.
If there are two huddles, with users A + B + C + D and A + B + C, and user D is deleted, it is replaced with a mirrordummy user. If mirrordummy subscriptions are not included in exports, then the two huddles have duplicate member sets, and will not be able to be imported successfully. Include huddle subscriptions for mirrordummy users in exports.
This commit is contained in:
committed by
Tim Abbott
parent
d293e869bd
commit
cfda414277
@@ -1101,7 +1101,9 @@ def fetch_reaction_data(response: TableData, message_ids: Set[int]) -> None:
|
||||
|
||||
def custom_fetch_huddle_objects(response: TableData, context: Context) -> None:
|
||||
realm = context["realm"]
|
||||
user_profile_ids = {r["id"] for r in response["zerver_userprofile"]}
|
||||
user_profile_ids = {
|
||||
r["id"] for r in response["zerver_userprofile"] + response["zerver_userprofile_mirrordummy"]
|
||||
}
|
||||
|
||||
# First we get all huddles involving someone in the realm.
|
||||
realm_huddle_subs = Subscription.objects.select_related("recipient").filter(
|
||||
|
||||
Reference in New Issue
Block a user