I'm thinking about using a new Microsub property in the entry to indicate the response URLs that may exist for this post.
{
"type": "entry",
...
"_like": "https://aaronparecki.com/xxxxxxx",
"_repost": "https://aaronparecki.com/yyyyyyyy"
}
alternately:
{
"type": "entry",
...
"_actions": {
"like": "https://aaronparecki.com/xxxxxxx",
"repost": "https://aaronparecki.com/yyyyyyyy"
}
}
For likes and reposts, from a UI perspective, we want to know whether the user has already liked or reposted a post (a boolean yes/no), in order to style the like/repost button differently, so in that case it makes sense to have those be a single string. (The client could send a Micropub delete request with the URL if the user taps the button again, to delete the like/repost.)
For replies, I'm not sure what we actually want the client to indicate. Long-term it would be great if the client had the ability to show the full conversation thread, so in that sense it makes sense to handle replies differently from likes and reposts. Maybe we can handle this question separately for replies.
In the case of likes and reposts, we only care about the URLs of the user's own like/repost posts. Showing other people who have liked or reposted a post is a different problem, since that does not affect the state of the action buttons.
In thinking through this, I'm leaning towards the second JSON option above, nesting the data under _actions
, since this data is limited in scope to help indicate the state of the action buttons. It is not meant to cover displaying all responses to a post.