mirror of https://gitlab.com/bashrc2/epicyon
followingOf on moved collection
parent
5b1f8c064a
commit
6fe0de61a1
|
@ -120,12 +120,10 @@ def get_moved_feed(base_dir: str, domain: str, port: int, path: str,
|
||||||
lines = get_moved_accounts(base_dir, nickname, domain,
|
lines = get_moved_accounts(base_dir, nickname, domain,
|
||||||
'following.txt')
|
'following.txt')
|
||||||
|
|
||||||
|
actor = local_actor_url(http_prefix, nickname, domain)
|
||||||
if header_only:
|
if header_only:
|
||||||
first_str = \
|
first_str = actor + '/moved?page=1'
|
||||||
local_actor_url(http_prefix, nickname, domain) + \
|
id_str = actor + '/moved'
|
||||||
'/moved?page=1'
|
|
||||||
id_str = \
|
|
||||||
local_actor_url(http_prefix, nickname, domain) + '/moved'
|
|
||||||
total_str = str(len(lines.items()))
|
total_str = str(len(lines.items()))
|
||||||
following = {
|
following = {
|
||||||
"@context": [
|
"@context": [
|
||||||
|
@ -134,6 +132,7 @@ def get_moved_feed(base_dir: str, domain: str, port: int, path: str,
|
||||||
],
|
],
|
||||||
'first': first_str,
|
'first': first_str,
|
||||||
'id': id_str,
|
'id': id_str,
|
||||||
|
'followingOf': actor,
|
||||||
'orderedItems': [],
|
'orderedItems': [],
|
||||||
'totalItems': total_str,
|
'totalItems': total_str,
|
||||||
'type': 'OrderedCollection'
|
'type': 'OrderedCollection'
|
||||||
|
@ -145,16 +144,15 @@ def get_moved_feed(base_dir: str, domain: str, port: int, path: str,
|
||||||
|
|
||||||
next_page_number = int(page_number + 1)
|
next_page_number = int(page_number + 1)
|
||||||
id_str = \
|
id_str = \
|
||||||
local_actor_url(http_prefix, nickname, domain) + \
|
actor + '/moved?page=' + str(page_number)
|
||||||
'/moved?page=' + str(page_number)
|
part_of_str = actor + '/moved'
|
||||||
part_of_str = \
|
|
||||||
local_actor_url(http_prefix, nickname, domain) + '/moved'
|
|
||||||
following = {
|
following = {
|
||||||
"@context": [
|
"@context": [
|
||||||
'https://www.w3.org/ns/activitystreams',
|
'https://www.w3.org/ns/activitystreams',
|
||||||
'https://w3id.org/security/v1'
|
'https://w3id.org/security/v1'
|
||||||
],
|
],
|
||||||
'id': id_str,
|
'id': id_str,
|
||||||
|
'followingOf': actor,
|
||||||
'orderedItems': [],
|
'orderedItems': [],
|
||||||
'partOf': part_of_str,
|
'partOf': part_of_str,
|
||||||
'totalItems': 0,
|
'totalItems': 0,
|
||||||
|
|
Loading…
Reference in New Issue