mirror of
https://github.com/zulip/zulip.git
synced 2025-11-10 17:07:07 +00:00
Backfill subscription realm audit log SUBSCRIPTION_CREATED events for users which are currently subscribed but don't have any subscription events, presumably due to some historical bug. This is important because those rows are necessary when reactivating a user who is currently soft-deactivated. For each stream, we find the subscribed users who have no subscription-related realm audit log entries, and create a `backfill=True` subscription audit log entry which is the latest it could have been, based on UserMessage rows. We then optionally insert a `DEACTIVATION` if the current subscription is not active.
17 KiB
17 KiB