kopia lustrzana https://gitlab.com/jaywink/federation
Change hostmeta fetchers relay default to empty string
rodzic
3bf19d2a8b
commit
2c255a68f7
|
@ -15,7 +15,7 @@ defaults = {
|
|||
'name': '',
|
||||
'open_signups': False,
|
||||
'protocols': [],
|
||||
'relay': False,
|
||||
'relay': '',
|
||||
'server_meta': {},
|
||||
'services': [],
|
||||
'platform': '',
|
||||
|
@ -85,7 +85,7 @@ def parse_nodeinfo2_document(doc, host):
|
|||
services = sorted(list(set(inbound + outbound)))
|
||||
result['services'] = services
|
||||
result['protocols'] = sorted(doc.get('protocols', []))
|
||||
result['relay'] = doc.get('relay', False)
|
||||
result['relay'] = doc.get('relay', '')
|
||||
result['organization']['contact'] = doc.get('organization', {}).get('contact', '')
|
||||
result['organization']['name'] = doc.get('organization', {}).get('name', '')
|
||||
result['organization']['account'] = doc.get('organization', {}).get('account', '')
|
||||
|
|
|
@ -18,7 +18,7 @@ class TestParseNodeInfoDocument:
|
|||
'name': 'I Like Toast',
|
||||
'open_signups': True,
|
||||
'protocols': ["diaspora"],
|
||||
'relay': False,
|
||||
'relay': '',
|
||||
'server_meta': {},
|
||||
'services': ["tumblr", "twitter"],
|
||||
'platform': 'diaspora',
|
||||
|
@ -59,7 +59,7 @@ class TestParseNodeInfoDocument:
|
|||
'name': 'I Like Toast',
|
||||
'open_signups': True,
|
||||
'protocols': ["diaspora"],
|
||||
'relay': False,
|
||||
'relay': '',
|
||||
'server_meta': {},
|
||||
'services': ["tumblr", "twitter"],
|
||||
'platform': 'diaspora',
|
||||
|
@ -136,7 +136,7 @@ class TestParseStatisticsJSONDocument:
|
|||
'name': 'diaspora*',
|
||||
'open_signups': True,
|
||||
'protocols': ["diaspora"],
|
||||
'relay': False,
|
||||
'relay': '',
|
||||
'server_meta': {},
|
||||
'services': [],
|
||||
'platform': 'diaspora',
|
||||
|
|
Ładowanie…
Reference in New Issue