kopia lustrzana https://github.com/snarfed/bridgy-fed
AP Follow bug fix: actors are fed.brid.gy/DOMAIN, not /r/ redirect URLs
rodzic
197d8a561f
commit
e090c2ba0a
|
@ -348,8 +348,11 @@ def redirect_unwrap(val):
|
|||
if isinstance(val, dict):
|
||||
return {k: redirect_unwrap(v) for k, v in val.items()}
|
||||
|
||||
if isinstance(val, basestring) and val.startswith(REDIRECT_PREFIX):
|
||||
return val[len(REDIRECT_PREFIX):]
|
||||
if isinstance(val, basestring):
|
||||
if val.startswith(REDIRECT_PREFIX):
|
||||
return val[len(REDIRECT_PREFIX):]
|
||||
elif val.startswith(appengine_config.HOST_URL):
|
||||
return util.domain_from_link(urlparse.urlparse(val).path.strip('/'))
|
||||
|
||||
return val
|
||||
|
||||
|
|
|
@ -56,17 +56,17 @@ FOLLOW_WRAPPED = {
|
|||
'id': 'https://mastodon.social/6d1af0b9-ef6a-46b0-b662-f79b21d7c983',
|
||||
'type': 'Follow',
|
||||
'actor': 'https://mastodon.social/users/swentel',
|
||||
'object': 'http://localhost/r/http://realize.be',
|
||||
'object': 'http://localhost/realize.be',
|
||||
}
|
||||
ACCEPT = {
|
||||
'@context': 'https://www.w3.org/ns/activitystreams',
|
||||
'type': 'Accept',
|
||||
'id': 'tag:localhost:accept/realize.be/https://mastodon.social/6d1af0b9-ef6a-46b0-b662-f79b21d7c983',
|
||||
'actor': 'http://localhost/r/http://realize.be',
|
||||
'actor': 'http://localhost/realize.be',
|
||||
'object': {
|
||||
'type': 'Follow',
|
||||
'actor': 'https://mastodon.social/users/swentel',
|
||||
'object': 'http://localhost/r/http://realize.be',
|
||||
'object': 'http://localhost/realize.be',
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue