scripts/opt_out.py bug fixes

pull/804/head
Ryan Barrett 2024-01-28 18:23:10 -08:00
rodzic 21ba279b31
commit 85a25e5f9e
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 6BE31FDF4776E9D4
1 zmienionych plików z 5 dodań i 1 usunięć

Wyświetl plik

@ -104,6 +104,10 @@ def run():
user = ndb.Key(kind, user_id).get()
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')
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
# out user's id, we choke. should probably relax that.
as2={
'verb': 'Delete',
'type': 'Delete',
'id': delete_id,
# if the actor is already deleted on this instance, it may
# return 502 here because it no longer has the actor's