use Message.object_id instead of Message.objectid

This commit is contained in:
Izalia Mae 2024-01-16 00:33:41 -05:00
parent 2ebb295be1
commit 3d9ba68bd1
2 changed files with 5 additions and 5 deletions

View file

@ -208,7 +208,7 @@ class RelayDatabase(dict):
def distill_inboxes(self, message: Message) -> Iterator[str]: def distill_inboxes(self, message: Message) -> Iterator[str]:
src_domains = { src_domains = {
message.domain, message.domain,
urlparse(message.objectid).netloc urlparse(message.object_id).netloc
} }
for domain, instance in self['relay-list'].items(): for domain, instance in self['relay-list'].items():

View file

@ -27,12 +27,12 @@ def person_check(actor: str, software: str) -> bool:
async def handle_relay(view: View) -> None: async def handle_relay(view: View) -> None:
if view.message.objectid in cache: if view.message.object_id in cache:
logging.verbose('already relayed %s', view.message.objectid) logging.verbose('already relayed %s', view.message.object_id)
return return
message = Message.new_announce(view.config.host, view.message.objectid) message = Message.new_announce(view.config.host, view.message.object_id)
cache[view.message.objectid] = message.id cache[view.message.object_id] = message.id
logging.debug('>> relay: %s', message) logging.debug('>> relay: %s', message)
inboxes = view.database.distill_inboxes(view.message) inboxes = view.database.distill_inboxes(view.message)