idno/idno — pull request #246 by mapkyca (2014-04-30 12:33:13+00:00)
Title: Adds add follow functionality

Ok, this is a big patch, so you may want me to walk you through it on the phone.

In a nut shell, it provides a bookmarklet which you can drag to your bar. Clicking on this will cause your idno install to extract any user information via mf2 from the page, and if found gives you the ability to edit before submitting.

Once submitted, if the user is local then a retrieval is attempted (error if not found), if it's remote, then retrieval is attempted and if not found then a new RemoteUser is created and saved.

I built out a couple of things in RemoteUser - as with remote webmention, we need a local UUID as well as a remote URL, so I modified getUUID to return a constructed local reference, but getUrl will return the actual profile URL found, so we can handle both.

I've also re-enabled save, since I needed to save it. I'll leave you to figure out how we handle APIs etc, since the user may not be an Idno user.

All being well, the user is added to the logged in user's following list and saved.

I also fixed a couple of other bugs/enhancements I found along the way. Many of the more important ones I've submitted as separate patches.

This patch doesn't go any further than providing a mechanism to add users to the following list, it doesn't provide a UI to list users nor any way to pull followed user's content. I didn't need that for what I was building, and I figured that's something you'd have strong feelings about, so I've left that for you.