Rather than using signals, we could use a registry to add hooks relevant for app_state and subscriptions. The first message confirming subscription could send the names of the batch messages that (probably) will be sent during collection. That way, we could construct a progress bar.
The registry could also do inexpensive checks on callbacks to exclude them. (Like if vote transfer is enabled at all)
Also, using a registry could create more deterministic order on the app_state messages.
This is a post ChanX issue
Rather than using signals, we could use a registry to add hooks relevant for app_state and subscriptions. The first message confirming subscription could send the names of the batch messages that (probably) will be sent during collection. That way, we could construct a progress bar.
The registry could also do inexpensive checks on callbacks to exclude them. (Like if vote transfer is enabled at all)
Also, using a registry could create more deterministic order on the app_state messages.
This is a post ChanX issue