kopia lustrzana https://github.com/snarfed/bridgy-fed
Protocol.delete_user_copy: use better id for delete activity
that's more likely to pass Protocol.owns_id for all protocols. (this was failing ATProto)pull/1221/head
rodzic
5454e19a23
commit
caa8dd2341
|
@ -33,6 +33,7 @@ from common import (
|
|||
report_error,
|
||||
subdomain_wrap,
|
||||
)
|
||||
import ids
|
||||
from ids import (
|
||||
BOT_ACTOR_AP_IDS,
|
||||
normalize_user_id,
|
||||
|
@ -1124,7 +1125,7 @@ class Protocol:
|
|||
user (User)
|
||||
"""
|
||||
now = util.now().isoformat()
|
||||
delete_id = f'{user.key.id()}#delete-copy-{copy_cls.LABEL}-{now}'
|
||||
delete_id = f'{ids.profile_id(id=user.key.id(), proto=user)}#delete-copy-{copy_cls.LABEL}-{now}'
|
||||
delete = Object(id=delete_id, source_protocol=user.LABEL, our_as1={
|
||||
'id': delete_id,
|
||||
'objectType': 'activity',
|
||||
|
|
|
@ -513,7 +513,7 @@ class IntegrationTests(TestCase):
|
|||
self.assert_equals({
|
||||
'@context': 'https://www.w3.org/ns/activitystreams',
|
||||
'type': 'Delete',
|
||||
'id': 'https://bsky.brid.gy/convert/ap/did:plc:alice#delete-copy-activitypub-2022-01-02T03:04:05+00:00',
|
||||
'id': 'https://bsky.brid.gy/convert/ap/at://did:plc:alice/app.bsky.actor.profile/self#delete-copy-activitypub-2022-01-02T03:04:05+00:00',
|
||||
'actor': 'https://bsky.brid.gy/ap/did:plc:alice',
|
||||
'object': 'https://bsky.brid.gy/ap/did:plc:alice',
|
||||
'to': ['https://www.w3.org/ns/activitystreams#Public'],
|
||||
|
|
Ładowanie…
Reference in New Issue