mirror of https://gitlab.com/bashrc2/epicyon
Misskey-style instance actor endpoint
parent
154578c00e
commit
b8e4ecbd66
|
@ -13986,6 +13986,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
|
|
||||||
# instance actor
|
# instance actor
|
||||||
if self.path == '/actor' or \
|
if self.path == '/actor' or \
|
||||||
|
self.path == '/users/instance.actor' or \
|
||||||
self.path == '/users/actor' or \
|
self.path == '/users/actor' or \
|
||||||
self.path == '/Actor' or \
|
self.path == '/Actor' or \
|
||||||
self.path == '/users/Actor':
|
self.path == '/users/Actor':
|
||||||
|
|
|
@ -1523,8 +1523,13 @@ def get_actor_json(hostDomain: str, handle: str, http: bool, gnunet: bool,
|
||||||
person_url = None
|
person_url = None
|
||||||
wf_request = None
|
wf_request = None
|
||||||
|
|
||||||
if '://' in original_actor and \
|
original_actor_lower = original_actor.lower()
|
||||||
original_actor.lower().endswith('/actor'):
|
ends_with_instance_actor = False
|
||||||
|
if original_actor_lower.endswith('/actor') or \
|
||||||
|
original_actor_lower.endswith('/instance.actor'):
|
||||||
|
ends_with_instance_actor = True
|
||||||
|
|
||||||
|
if '://' in original_actor and ends_with_instance_actor:
|
||||||
if debug:
|
if debug:
|
||||||
print(original_actor + ' is an instance actor')
|
print(original_actor + ' is an instance actor')
|
||||||
person_url = original_actor
|
person_url = original_actor
|
||||||
|
|
3
posts.py
3
posts.py
|
@ -2759,7 +2759,8 @@ def send_signed_json(post_json_object: {}, session, base_dir: str,
|
||||||
print("to_person_id: " + str(to_person_id))
|
print("to_person_id: " + str(to_person_id))
|
||||||
print("shared_inbox_url: " + str(shared_inbox_url))
|
print("shared_inbox_url: " + str(shared_inbox_url))
|
||||||
if inbox_url:
|
if inbox_url:
|
||||||
if inbox_url.endswith('/actor/inbox'):
|
if inbox_url.endswith('/actor/inbox') or \
|
||||||
|
inbox_url.endswith('/instance.actor/inbox'):
|
||||||
inbox_url = shared_inbox_url
|
inbox_url = shared_inbox_url
|
||||||
|
|
||||||
if not inbox_url:
|
if not inbox_url:
|
||||||
|
|
3
tests.py
3
tests.py
|
@ -3047,6 +3047,8 @@ def test_client_to_server(base_dir: str):
|
||||||
|
|
||||||
print(">>> s2s post arrived in Bob's inbox")
|
print(">>> s2s post arrived in Bob's inbox")
|
||||||
|
|
||||||
|
time.sleep(2)
|
||||||
|
|
||||||
calendar_path = bob_dir + '/accounts/bob@' + bob_domain + '/calendar'
|
calendar_path = bob_dir + '/accounts/bob@' + bob_domain + '/calendar'
|
||||||
if not os.path.isdir(calendar_path):
|
if not os.path.isdir(calendar_path):
|
||||||
print('Missing calendar path: ' + calendar_path)
|
print('Missing calendar path: ' + calendar_path)
|
||||||
|
@ -6744,4 +6746,5 @@ def run_all_tests():
|
||||||
_test_followers_on_domain(base_dir)
|
_test_followers_on_domain(base_dir)
|
||||||
_test_follows(base_dir)
|
_test_follows(base_dir)
|
||||||
_test_group_followers(base_dir)
|
_test_group_followers(base_dir)
|
||||||
|
time.sleep(2)
|
||||||
print('Tests succeeded\n')
|
print('Tests succeeded\n')
|
||||||
|
|
Loading…
Reference in New Issue