getlantern/lantern#1622 Lazily creating user on invited check

createInvitee already checks whether the user exists and, as per your
changes, effectively does nothing in that case.


On Wed, Jun 25, 2014 at 6:37 PM, oxtoacart <notifications@github.com> wrote:

> In src/main/java/org/lantern/XmppAvailableServlet.java:
>
> > @@ -56,7 +56,7 @@ public void doPost(final HttpServletRequest req,
> >          } catch (EmailAddressUtils.NormalizationException e) {
> >              throw new RuntimeException(e);
> >          }
> > -        if (!dao.isInvited(from)) {
> > +        if (!dao.inviteIfNecessary(from)) {
>
> But wait, we still need to do the work that inviteIfNecessary does to
> check for the existence of the user. If the user does already exist,
> there's no point in going through the createInvitee logic.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/getlantern/lantern-controller/pull/74/files#r14197464>
> .
>