mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-12-23 00:26:33 +00:00
parent
cf113e50fe
commit
cf06b40c08
2 changed files with 10 additions and 0 deletions
|
@ -298,3 +298,11 @@ def handle_update_book(user, book):
|
|||
recipients = get_recipients(None, 'public')
|
||||
broadcast(user, update_activity, recipients)
|
||||
|
||||
|
||||
def handle_update_user(user):
|
||||
''' broadcast editing a user's profile '''
|
||||
actor = activitypub.get_actor(user)
|
||||
update_activity = activitypub.get_update(user, actor)
|
||||
recipients = get_recipients(user, 'public')
|
||||
broadcast(user, update_activity, recipients)
|
||||
|
||||
|
|
|
@ -83,6 +83,8 @@ def edit_profile(request):
|
|||
request.user.manually_approves_followers = \
|
||||
form.cleaned_data['manually_approves_followers']
|
||||
request.user.save()
|
||||
|
||||
outgoing.handle_update_user(request.user)
|
||||
return redirect('/user/%s' % request.user.localname)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue