From 32764a1f93956e2c237c689aaf31389feceb9264 Mon Sep 17 00:00:00 2001 From: Izalia Mae Date: Fri, 25 Nov 2022 13:39:52 -0500 Subject: [PATCH] make sure domain key exists for inboxes --- relay/database.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/relay/database.py b/relay/database.py index d1d64a7..85daf6b 100644 --- a/relay/database.py +++ b/relay/database.py @@ -71,6 +71,7 @@ class RelayDatabase(dict): for item in data.get('relay-list', []): domain = urlparse(item).hostname self['relay-list'][domain] = { + 'domain': domain, 'inbox': item, 'followid': None } @@ -83,6 +84,9 @@ class RelayDatabase(dict): self.del_inbox(domain) continue + if not instance.get('domain'): + instance['domain'] = domain + new_db = False except FileNotFoundError: