sharesOf on announces collection

main
Bob Mottram 2025-03-31 12:22:43 +01:00
parent 980ae88afb
commit e2d2fa1356
2 changed files with 5 additions and 2 deletions

View File

@ -594,6 +594,7 @@ def get_shares_feed_for_person(base_dir: str,
'id': shared_items_collection_id, 'id': shared_items_collection_id,
'orderedItems': [], 'orderedItems': [],
'partOf': id_str + '/' + shares_file_type, 'partOf': id_str + '/' + shares_file_type,
'sharedItemsOf': id_str,
'totalItems': 0, 'totalItems': 0,
'type': 'OrderedCollectionPage' 'type': 'OrderedCollectionPage'
} }

View File

@ -3453,7 +3453,8 @@ def update_announce_collection(recent_posts_cache: {},
pprint(post_json_object) pprint(post_json_object)
print('DEBUG: post ' + post_filename + ' has no object') print('DEBUG: post ' + post_filename + ' has no object')
return return
post_url = remove_id_ending(post_json_object['id']) + '/shares' post_url = remove_id_ending(post_json_object['id'])
collection_id = post_url + '/shares'
if not post_json_object['object'].get('shares'): if not post_json_object['object'].get('shares'):
if debug: if debug:
print('DEBUG: Adding initial shares (announcements) to ' + print('DEBUG: Adding initial shares (announcements) to ' +
@ -3463,7 +3464,8 @@ def update_announce_collection(recent_posts_cache: {},
'https://www.w3.org/ns/activitystreams', 'https://www.w3.org/ns/activitystreams',
'https://w3id.org/security/v1' 'https://w3id.org/security/v1'
], ],
'id': post_url, 'id': collection_id,
'sharesOf': post_url,
'type': 'Collection', 'type': 'Collection',
"totalItems": 1, "totalItems": 1,
'items': [{ 'items': [{