kopia lustrzana https://github.com/snarfed/bridgy-fed
ActivityPub.convert: compact actor to just id
rodzic
33c5c3a4d2
commit
5d0b275ca8
|
@ -331,11 +331,15 @@ class ActivityPub(User, Protocol):
|
||||||
if obj.as2:
|
if obj.as2:
|
||||||
return obj.as2
|
return obj.as2
|
||||||
|
|
||||||
translated = as2.from_as1(cls.translate_ids(obj.as1))
|
translated = cls.translate_ids(obj.as1)
|
||||||
if obj.source_protocol in ('ap', 'activitypub'):
|
if translated:
|
||||||
return translated
|
translated['actor'] = as1.get_object(translated, 'actor').get('id')
|
||||||
|
|
||||||
return postprocess_as2(translated, **kwargs)
|
converted = as2.from_as1(translated)
|
||||||
|
if obj.source_protocol in ('ap', 'activitypub'):
|
||||||
|
return converted
|
||||||
|
|
||||||
|
return postprocess_as2(converted, **kwargs)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def verify_signature(cls, activity):
|
def verify_signature(cls, activity):
|
||||||
|
|
Ładowanie…
Reference in New Issue