lantern icon indicating copy to clipboard operation
lantern copied to clipboard

When adding a friend fails because of a problem subscribing to XMPP notifications, the user's friending quota is decremented none-the-less

Open oxtoacart opened this issue 12 years ago • 5 comments

Related to #2022

The problem is here

Upon adding a friend, we immediately sync friends, which immediately pushes the update to the server, whereupon the server decrements your friending quota.

Only after this do we attempt to subscribe to XMPP presence and if that fails, we remove the friend. However, removing a friend doesn't restore the friend quota because at that point an email has already gone to the friend. This logic is a holdover from the days when we assigned fallbacks to specific users. Now that we have open downloads, it would actually be okay to increment the friend quota whenever someone unfriends a user.

oxtoacart avatar Dec 01 '14 21:12 oxtoacart

To put this succinctly, now that we have open downloads, invitations should be essentially free. We may still want to use the friends quota to cap the total number of active friends at any given time for kscope purposes, but that's a different consideration than invitations.

If we ever redesign the UI to clearly distinguish between the activities of "trusting" and "inviting", this may also become easier to explain to the user.

oxtoacart avatar Dec 01 '14 21:12 oxtoacart

I think (not 100% sure) that given how the logic works, one will always get this error when adding non-Google friends.

oxtoacart avatar Dec 01 '14 21:12 oxtoacart

there are lots of confusion caused by this friending legacy. if downloading is free, why don't we also remove the invitation as well, and use google talk friend directly.

ed2k avatar Dec 02 '14 07:12 ed2k

Moving to be with #2006 under the theory that that's the root cause.

scouttle avatar Dec 02 '14 18:12 scouttle

Actually, note: although fixing #2006 will hopefully reduce the frequency with which this codepath is executed, it sounds like the logic of this codepath is still a bit weird (and may be triggered whenever non-Google users are invited).

Given that most users don't bump up against the current friend limits and we have plans to replace our use of XMPP soon, propose that sort out the proper logic in the eventual parallel invitation case in the new codebase and UI later.

scouttle avatar Dec 02 '14 18:12 scouttle