make sure domain key exists for inboxes
This commit is contained in:
parent
fbe5746a18
commit
32764a1f93
|
@ -71,6 +71,7 @@ class RelayDatabase(dict):
|
||||||
for item in data.get('relay-list', []):
|
for item in data.get('relay-list', []):
|
||||||
domain = urlparse(item).hostname
|
domain = urlparse(item).hostname
|
||||||
self['relay-list'][domain] = {
|
self['relay-list'][domain] = {
|
||||||
|
'domain': domain,
|
||||||
'inbox': item,
|
'inbox': item,
|
||||||
'followid': None
|
'followid': None
|
||||||
}
|
}
|
||||||
|
@ -83,6 +84,9 @@ class RelayDatabase(dict):
|
||||||
self.del_inbox(domain)
|
self.del_inbox(domain)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
if not instance.get('domain'):
|
||||||
|
instance['domain'] = domain
|
||||||
|
|
||||||
new_db = False
|
new_db = False
|
||||||
|
|
||||||
except FileNotFoundError:
|
except FileNotFoundError:
|
||||||
|
|
Loading…
Reference in a new issue