kopia lustrzana https://github.com/snarfed/bridgy-fed
rodzic
fe27742b80
commit
47b3dd29d0
|
@ -550,7 +550,11 @@ def actor(protocol, domain):
|
|||
g.user = cls.get_or_create(id=domain, actor_as2=actor_as2)
|
||||
|
||||
# TODO: unify with common.actor()
|
||||
actor = postprocess_as2(g.user.actor_as2 or {'type': 'Person'})
|
||||
actor = g.user.actor_as2 or {
|
||||
'@context': [as2.CONTEXT],
|
||||
'type': 'Person',
|
||||
}
|
||||
actor = postprocess_as2(actor)
|
||||
actor.update({
|
||||
'id': g.user.ap_actor(),
|
||||
# This has to be the domain for Mastodon etc interop! It seems like it
|
||||
|
|
|
@ -304,7 +304,10 @@ class ActivityPubTest(TestCase):
|
|||
type = got.headers['Content-Type']
|
||||
self.assertTrue(type.startswith(as2.CONTENT_TYPE), type)
|
||||
self.assertEqual({
|
||||
'@context': ['https://w3id.org/security/v1'],
|
||||
'@context': [
|
||||
'https://www.w3.org/ns/activitystreams',
|
||||
'https://w3id.org/security/v1',
|
||||
],
|
||||
'type': 'Person',
|
||||
'id': 'http://bf/fake.com/ap',
|
||||
'preferredUsername': 'fake.com',
|
||||
|
|
Ładowanie…
Reference in New Issue