Factorized undo follow

This commit is contained in:
Eliot Berriot 2018-04-04 22:40:57 +02:00
parent d8f86c4fce
commit cb9309c298
No known key found for this signature in database
GPG key ID: DD6965E2476E5C27
2 changed files with 42 additions and 22 deletions

View file

@ -101,6 +101,20 @@ def get_follow(follow_id, follower, followed):
}
def get_undo(id, actor, object):
return {
'@context': [
'https://www.w3.org/ns/activitystreams',
'https://w3id.org/security/v1',
{}
],
'type': 'Undo',
'id': id + '/undo',
'actor': actor.url,
'object': object,
}
def get_accept_follow(accept_id, accept_actor, follow, follow_actor):
return {
"@context": [