getlantern/lantern-controller — pull request #51 by aranhoide (2013-11-18 23:52:43+00:00)
Title: Enqueue invites to senders of mail to this controller

Right now we're accepting messages to `invite@.appspotmail.com`. Emails to any other address in this domain will be accepted and processed, but a warning will be logged out.

For each such email, we enqueue an invitation from `invite@getlantern.org` to the email sender, unless such an invitation already exists, in which case we do nothing. As of this writing, those invitations are not automatically accepted.

One thing I realized while committing this is that we no longer need the refresh tokens of users who are not fallback proxy users. For focus, I chose not to remove the sending and storing of refresh tokens, although I think that should be done ASAP. But I took advantage of that to avoid having to query and pass the refresh token of `invite@getlantern.org` on every invite enqueued by this system.