make sure domain key exists for inboxes

This commit is contained in:
Izalia Mae 2022-11-25 13:39:52 -05:00
parent fbe5746a18
commit 32764a1f93

View file

@ -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: