snarfed / granary

💬 The social web translator
https://granary.io
Creative Commons Zero v1.0 Universal
433 stars 57 forks source link

AS2 vocab translation coordination/funkiness #116

Open strugee opened 6 years ago

strugee commented 6 years ago

Heya!

I'm currently working on translating AS1 vocabulary to AS2 in pump.io in preparation for our migration to ActivityPub - I wanted to see what Granary does and try to align if possible.

Looking at https://github.com/snarfed/granary/blob/d76e923c2fb3142223668c665c3bff7f76207882/granary/as2.py I spotted a couple things that seemed funky:

Let me know if I missed something. https://github.com/pump-io/pump.io/pull/1483#issuecomment-342046659 is tracking this in pump.io FWIW.

Cheers :)

snarfed commented 6 years ago

thanks for looking at this! i expect you're right on these points in general. I'll fix them soon!

snarfed commented 6 years ago

Shouldn't type = obj.pop('type', None) be @type, not type?

AS2 prefers type, not @type, right? @type is JSON-LD, right? https://w3c.github.io/activitystreams/core/ only shows @type for JSON-LD compatibility, and https://w3c.github.io/activitypub/ doesn't mention @type at all.