[pull] main from forem:main#323
Merged
Merged
Conversation
…DP (#23574) * Emit DEV moderation events to the Customer.io CDP Suspending, spam-flagging, or banishing a user (and the reversals) now emits user_suspended / user_spam_flagged / user_banished / user_unsuspended / user_spam_unflagged through the existing Trackable pipeline, so MLH Core can scope the DEV newsletter and prune bot Customer.io profiles. Emission goes through add_role/remove_role (the single choke point for every moderation path) and only fires on actual role transitions; banish also emits explicitly with the pre-banish username. Same gates as the rest of the DEV → Core sync: customerio_cdp_enabled + the dev_core_user_sync feature flag. * Emit user_gdpr_deleted to the DEV → Core sync on account deletion Users::DeleteWorker is the single choke point for both self-service and admin deletions (it already records the GDPRDeleteRequest), so the event is emitted there after the destroy. Core uses it to erase the DEV-derived data it holds — and to delete DEV-only user records and their Customer.io profiles entirely. * Suppress the banish-internal user_suspended emission Banish grants the suspended role via handle_user_status, which the new add_role override would emit as user_suspended alongside user_banished. The two events race through the CDP: if user_suspended lands second, Core's moderation marker downgrades from banished to suspended after the CIO prune already ran. Wrapping the role grant in User.skip_trackable_events makes banish a single user_banished event.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )