Make it use the /lookup if it can.

Make it use the /lookup if it can.

The search endpoint is so terrible.  So terrible.  I failed to find a guy
about 20 times.  I know the guy's in there.  I am following this guy.  It
should be easy to find this guy.

So, anyway, I backported /api/v1/accounts/lookup to Pleroma.  You can't
just *add* and *endpoint* and think that "compiles" means "works" in
the Thunderdome:  two different runtime errors!  One of which was only
triggered when making a request (you've gotta define operations in the
file full of operation definitions?) and the other of which was that
whatever has changed between this version and current, it's altered the
pattern expected to be matched, so we just juggle the params and guess.
While I was in there, I saw that upstream Pleroma is using
User.get_by_nickname instead of User.get_cached_by_nickname but I bet
the endpoint is fast enough even without that; I changed it anyway.
  • [DH] bigmoney.go