kopia lustrzana https://github.com/snarfed/bridgy-fed
webfinger: preserve order of u-urls from h-card
rodzic
b7daa0e4ee
commit
26efa299d6
|
@ -83,18 +83,18 @@ class WebFingerTest(unittest.TestCase):
|
|||
self.assertEquals({
|
||||
'subject': 'acct:@foo.com',
|
||||
'aliases': [
|
||||
'https://foo.com/',
|
||||
'https://foo.com/about-me',
|
||||
'https://foo.com/',
|
||||
],
|
||||
'magic_keys': [{'value': key.href()}],
|
||||
'links': [{
|
||||
'rel': 'http://webfinger.net/rel/profile-page',
|
||||
'type': 'text/html',
|
||||
'href': 'https://foo.com/'
|
||||
'href': 'https://foo.com/about-me'
|
||||
}, {
|
||||
'rel': 'http://webfinger.net/rel/profile-page',
|
||||
'type': 'text/html',
|
||||
'href': 'https://foo.com/about-me'
|
||||
'href': 'https://foo.com/'
|
||||
}, {
|
||||
'rel': 'magic-public-key',
|
||||
'href': key.href(),
|
||||
|
|
|
@ -43,7 +43,7 @@ representative h-card</a> on %s""" % resp.url)
|
|||
uri = '@%s' % domain
|
||||
key = models.MagicKey.get_or_create(uri)
|
||||
props = hcard.get('properties', {})
|
||||
urls = sorted(set(props.get('url', []) + [resp.url]))
|
||||
urls = util.dedupe_urls(props.get('url', []) + [resp.url])
|
||||
|
||||
# appengine_config.HOST
|
||||
return util.trim_nulls({
|
||||
|
|
Ładowanie…
Reference in New Issue