mirror of
https://git.pleroma.social/pleroma/relay.git
synced 2024-12-22 19:21:08 +00:00
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', []):
|
||||
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:
|
||||
|
|
Loading…
Reference in a new issue