Broadcast book update events
This commit is contained in:
parent
db6af61f03
commit
cf113e50fe
5 changed files with 35 additions and 4 deletions
|
@ -1,7 +1,7 @@
|
|||
''' bring activitypub functions into the namespace '''
|
||||
from .actor import get_actor
|
||||
from .book import get_book
|
||||
from .create import get_create
|
||||
from .create import get_create, get_update
|
||||
from .follow import get_following, get_followers
|
||||
from .follow import get_follow_request, get_unfollow, get_accept, get_reject
|
||||
from .outbox import get_outbox, get_outbox_page
|
||||
|
|
|
@ -30,4 +30,17 @@ def get_create(user, status_json):
|
|||
}
|
||||
|
||||
|
||||
def get_update(user, activity_json):
|
||||
''' a user profile or book or whatever got updated '''
|
||||
# TODO: should this have a signature??
|
||||
return {
|
||||
'@context': 'https://www.w3.org/ns/activitystreams',
|
||||
'id': 'https://friend.camp/users/tripofmice#updates/1585446332',
|
||||
'type': 'Update',
|
||||
'actor': user.actor,
|
||||
'to': [
|
||||
'https://www.w3.org/ns/activitystreams#Public'
|
||||
],
|
||||
|
||||
'object': activity_json,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue