aaronpk / XRay

X-Ray returns structured data from any URL
https://xray.p3k.app
MIT License
90 stars 15 forks source link

Allow follow-of #78

Closed swentel closed 6 years ago

swentel commented 6 years ago

Bridgy Fed has started sending webmentions when someone follows you. Add support for the 'follow-of' property. See https://indieweb.org/follow#Bridgy_Fed

Example source from fed.brid.gy : https://fed.brid.gy/render?source=https%3A%2F%2Fmastodon.social%2Fb8177a60-8f80-47a0-b943-a9df876cf5d5&target=https%3A%2F%2Frealize.be%2F

aaronpk commented 6 years ago

Was there a particular reason for returning this property as an array? One of the things XRay does is make a decision about whether a property will be returned as an array or as a single value. From what I've seen on most other places, a "follow" action is always taken on just one object.

swentel commented 6 years ago

Oh, no particular reason. You're right, follow should definitely be single.

aaronpk commented 6 years ago

Thanks! I replaced this with a new commit, and added tests.