kopia lustrzana https://github.com/snarfed/bridgy-fed
scripts/opt_out.py bug fixes
rodzic
21ba279b31
commit
85a25e5f9e
|
@ -104,6 +104,10 @@ def run():
|
||||||
user = ndb.Key(kind, user_id).get()
|
user = ndb.Key(kind, user_id).get()
|
||||||
assert user, f'{kind} {user_id} not found'
|
assert user, f'{kind} {user_id} not found'
|
||||||
|
|
||||||
|
if not user.manual_opt_out:
|
||||||
|
user.manual_opt_out = True
|
||||||
|
user.put()
|
||||||
|
|
||||||
targets = [Target(uri=t, protocol='activitypub')
|
targets = [Target(uri=t, protocol='activitypub')
|
||||||
for t in AP_BASE_TARGETS + extra_targets]
|
for t in AP_BASE_TARGETS + extra_targets]
|
||||||
|
|
||||||
|
@ -119,7 +123,7 @@ def run():
|
||||||
# use as2 so that we don't convert. if we try to convert an opted
|
# use as2 so that we don't convert. if we try to convert an opted
|
||||||
# out user's id, we choke. should probably relax that.
|
# out user's id, we choke. should probably relax that.
|
||||||
as2={
|
as2={
|
||||||
'verb': 'Delete',
|
'type': 'Delete',
|
||||||
'id': delete_id,
|
'id': delete_id,
|
||||||
# if the actor is already deleted on this instance, it may
|
# if the actor is already deleted on this instance, it may
|
||||||
# return 502 here because it no longer has the actor's
|
# return 502 here because it no longer has the actor's
|
||||||
|
|
Ładowanie…
Reference in New Issue