mirror of
https://code.eliotberriot.com/funkwhale/funkwhale.git
synced 2025-10-04 21:29:24 +02:00
Factorized undo follow
This commit is contained in:
parent
d8f86c4fce
commit
cb9309c298
2 changed files with 42 additions and 22 deletions
|
@ -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": [
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue