From 3d9ba68bd1c6033330c3be3ab9987c6dc79271f4 Mon Sep 17 00:00:00 2001 From: Izalia Mae Date: Tue, 16 Jan 2024 00:33:41 -0500 Subject: [PATCH] use Message.object_id instead of Message.objectid --- relay/database.py | 2 +- relay/processors.py | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/relay/database.py b/relay/database.py index 135270e..5d059dd 100644 --- a/relay/database.py +++ b/relay/database.py @@ -208,7 +208,7 @@ class RelayDatabase(dict): def distill_inboxes(self, message: Message) -> Iterator[str]: src_domains = { message.domain, - urlparse(message.objectid).netloc + urlparse(message.object_id).netloc } for domain, instance in self['relay-list'].items(): diff --git a/relay/processors.py b/relay/processors.py index 5276ef6..b9b32bc 100644 --- a/relay/processors.py +++ b/relay/processors.py @@ -27,12 +27,12 @@ def person_check(actor: str, software: str) -> bool: async def handle_relay(view: View) -> None: - if view.message.objectid in cache: - logging.verbose('already relayed %s', view.message.objectid) + if view.message.object_id in cache: + logging.verbose('already relayed %s', view.message.object_id) return - message = Message.new_announce(view.config.host, view.message.objectid) - cache[view.message.objectid] = message.id + message = Message.new_announce(view.config.host, view.message.object_id) + cache[view.message.object_id] = message.id logging.debug('>> relay: %s', message) inboxes = view.database.distill_inboxes(view.message)