Subgroups Webhook - Discuss how to handle Group Transfer events
Release notes
Problem to solve
When we introduced subgroup webhooks, the transfer scenario was not covered as part of the MVC. See discussion here.
Proposal
We have a couple of options about how to fire subgroup transfer events and how to "name" them (ie, what should be the event_name in the webhook data):
- Treat transfers as
destroyevent, ie, when a subgroup is transffered, it would mean the same to the parent as when a subgroup in it is destroyed. - Be very general: Just name the event as
update, just like we would do, for saychange of visibility of a subgroupevent. - Be slightly specific: Name this event as
renameas a subgroup transfer would mean change in its path anyway. But the downside here is the consumer of the webhook wouldn't actually know if the event is actually a transfer or just a rename. (We already userenameas event name for system hooks) - Be very specific: Introduce 2 new events for subgroup transfer (
subgroup_transfer_out,subgroup_transfer_in).subgroup_transfer_outevent will be fired to the webhook of the old parent andsubgroup_transfer_inevent will be fired to the webhook of the new parent. (if old parent/new parent are subscribed tosubgroup eventsin their webhook preferences, of course) - Open to any other ideas as well.
Edited by Manoj M J