Skip to content
This repository has been archived by the owner on Nov 22, 2024. It is now read-only.

Commit

Permalink
bob is following alice but alice for some reason is not following bob
Browse files Browse the repository at this point in the history
Signed-off-by: John Andersen <[email protected]>
  • Loading branch information
pdxjohnny committed Oct 24, 2023
1 parent f9f7206 commit e83cac1
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions scitt_emulator/federation_activitypub_bovine.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,9 @@ def __init__(self, app, signals, config_path):

async def initialize_service(self):
# TODO Better domain / fqdn building
self.domain = f'http://127.0.0.1:{self.app.config["port"]}'
self.domain = f'http://localhost:{self.app.config["port"]}'

config_toml_path = pathlib.Path(self.workspace, "config.toml")
config_toml_path.unlink()
if not config_toml_path.exists():
logger.info("Actor client config does not exist, creating...")
cmd = [
Expand Down Expand Up @@ -195,7 +194,7 @@ async def federate_created_entries_pass_client(
service_parameters_path.write_bytes(service_parameters)

clazz = TREE_ALGS[treeAlgorithm]
service = clazz(service_parameters_path=service_parameters_path)
service = clazz(signals=SCITTSignals(), service_parameters_path=service_parameters_path)
service.verify_receipt(cose_path, receipt_path)

logger.info("Receipt verified")
Expand All @@ -222,8 +221,6 @@ async def _init_follow(client, actor_id: str, domain: str = None, retry: int = 5
)
if not url:
raise WebFingerLookupNotFoundError(f"actor_id: {actor_id}, domain: {domain}")
remote_data = await client.get(url)
remote_inbox = remote_data["inbox"]
activity = client.activity_factory.follow(
url,
).build()
Expand All @@ -235,7 +232,7 @@ async def init_follow(client, retry: int = 5, **kwargs):
for i in range(0, retry):
try:
return await _init_follow(client, retry=retry, **kwargs)
except WebFingerLookupNotFoundError as error:
except Exception as error:
logger.error(repr(error))
await asyncio.sleep(2**i)

Expand Down

0 comments on commit e83cac1

Please sign in to comment.