mirror of
https://git.pleroma.social/pleroma/relay.git
synced 2024-11-10 02:17:59 +00:00
Implement handle_delete to forward delete
This commit is contained in:
parent
9d1c6a3fa2
commit
08fe53bdbd
|
@ -209,6 +209,22 @@ async def handle_relay(actor, data, request):
|
|||
CACHE[object_id] = activity_id
|
||||
|
||||
|
||||
async def handle_delete(actor, data, request):
|
||||
object_id = distill_object_id(data)
|
||||
|
||||
logging.debug('>> Relay %r', data)
|
||||
|
||||
inboxes = distill_inboxes(actor, object_id)
|
||||
|
||||
futures = [
|
||||
push_message_to_actor(
|
||||
{'inbox': inbox},
|
||||
data,
|
||||
'https://{}/actor#main-key'.format(request.host))
|
||||
for inbox in inboxes]
|
||||
asyncio.ensure_future(asyncio.gather(*futures))
|
||||
|
||||
|
||||
async def handle_follow(actor, data, request):
|
||||
global DATABASE
|
||||
|
||||
|
@ -265,6 +281,7 @@ async def handle_undo(actor, data, request):
|
|||
processors = {
|
||||
'Announce': handle_relay,
|
||||
'Create': handle_relay,
|
||||
'Delete': handle_delete,
|
||||
'Follow': handle_follow,
|
||||
'Undo': handle_undo
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue