cattle_grid.extensions.examples.recipients
Simple transformer type extension that adds the recipients and whether the activity is public to the data. You can include this transformer into cattle_grid by adding
to your configuration file.
transformer
async
The transformer
>>> from asyncio import run
>>> run(transformer({"raw": {"type": "Activity", "to": ["http://alice.example"]}}))
{'recipients': {'recipients': ['http://alice.example'], 'public': False}}