kopia lustrzana https://github.com/snarfed/bridgy-fed
rodzic
2c6a470058
commit
eb7da31873
|
@ -787,21 +787,22 @@ def actor(handle_or_id):
|
||||||
id = handle_or_id
|
id = handle_or_id
|
||||||
|
|
||||||
assert id
|
assert id
|
||||||
g.user = cls.get_or_create(id)
|
user = cls.get_or_create(id)
|
||||||
if not g.user.obj or not g.user.obj.as1:
|
if not user.obj or not user.obj.as1:
|
||||||
g.user.obj = cls.load(g.user.profile_id(), gateway=True)
|
user.obj = cls.load(user.profile_id(), gateway=True)
|
||||||
|
|
||||||
actor = ActivityPub.convert(g.user.obj) or {
|
g.user = user
|
||||||
|
actor = ActivityPub.convert(user.obj) or {
|
||||||
'@context': [as2.CONTEXT],
|
'@context': [as2.CONTEXT],
|
||||||
'type': 'Person',
|
'type': 'Person',
|
||||||
}
|
}
|
||||||
actor = postprocess_as2(actor)
|
actor = postprocess_as2(actor)
|
||||||
actor.update({
|
actor.update({
|
||||||
'id': g.user.ap_actor(),
|
'id': user.ap_actor(),
|
||||||
'inbox': g.user.ap_actor('inbox'),
|
'inbox': user.ap_actor('inbox'),
|
||||||
'outbox': g.user.ap_actor('outbox'),
|
'outbox': user.ap_actor('outbox'),
|
||||||
'following': g.user.ap_actor('following'),
|
'following': user.ap_actor('following'),
|
||||||
'followers': g.user.ap_actor('followers'),
|
'followers': user.ap_actor('followers'),
|
||||||
'endpoints': {
|
'endpoints': {
|
||||||
'sharedInbox': subdomain_wrap(cls, '/ap/sharedInbox'),
|
'sharedInbox': subdomain_wrap(cls, '/ap/sharedInbox'),
|
||||||
},
|
},
|
||||||
|
|
Ładowanie…
Reference in New Issue