I looked again into this : afaik we don't support user privacy-level downgrade in funkwhale : if a user set it's profile to "me" or "instance" the update is not dispatched through federation
Also we don't support "followers" privacy setting for user.
this will allow to do the same has my previous proposition but in a much easier way.
def dispatch_privacy_downgrade(privacy_level, user):
if privacy_level == "me" or privacy_level == "instance":
# this will automatically delete all related actor aciivities
routes.outbox.dispatch(
{"type": "Delete", "object": {"type": user.actor.type}},
context={"actor": user.actor},
)
if privacy_level == "followers":
routes.outbox.dispatch(
{"type": "Update", "object": {"type": user.actor.type}},
context={"actor": user.actor},
)
the only thing lacking in the actual code is "followers" privacy setting support