That's right.  It feels weird that I'm more likely to see a friend
suggestion for someone who is not on my roster than for someone who is.  It
certainly confused me :)


Cheers,
Ox

-----------------------------------------------------------------------------------------

"I love people who harness themselves, an ox to a heavy cart,
who pull like water buffalo, with massive patience,
who strain in the mud and the muck to move things forward,
who do what has to be done, again and again."

- Marge Piercy



On Sun, Jan 12, 2014 at 6:35 PM, myleshorton <notifications@github.com>wrote:

> In src/main/java/org/lantern/friending/Friending.java:
>
> > -                        return success(quota, friends);
> > +                        Set<Friend> uniqueFriends = new HashSet<Friend>(friends);
> > +                        // Find friend relationships referencing this user and add them
> > +                        // to the set of unique Friends as free to friend
> > +                        List<LanternFriend> reverseFriends = new Dao()
> > +                                .withObjectify(new DbCall<List<LanternFriend>>() {
> > +                                    @Override
> > +                                    public List<LanternFriend> call(Objectify ofy) {
> > +                                        return ofy.query(LanternFriend.class)
> > +                                                .filter("email", userEmail)
> > +                                                .filter("status", Status.friend)
> > +                                                .list();
> > +                                    }
> > +                                });
> > +                        for (Friend friend : reverseFriends) {
> > +                            uniqueFriends.add(new LanternFriend(friend.getUserEmail(), userEmail, Status.pending, true));
>
> No - that's right. So if you're already on each other's roster, you don't
> get a subscription request. You do get a presence notification when both
> users are running Lantern at the same time. So it's a bit "lazy" in the
> sense that a new LanternFriend only gets created as soon as both sides are
> running Lantern, but you have to both be running Lantern eventually for the
> whole thing to work.
>
> So basically with your change it'll show the friend suggestion sooner in
> the case where you're already on each other's rosters.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/getlantern/lantern-controller/pull/59/files#r8816242>
> .
>