New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Friend-adding mechanism #2

lukebarnard1 opened this Issue Mar 26, 2015 · 3 comments


None yet
1 participant

lukebarnard1 commented Mar 26, 2015

Adding friends should be possible by just knowing the IP of the person you want to be friends with. You should send a request to their server, which will be part of the standard protocol, providing your name and IP. The request can be dealt with in any way seen fit by the server. Perhaps it chooses to add them immediately or perhaps it puts them in a queue, waiting to be accepted, whilst notifying the owner of this.

The URL for this could be


And all information could be sent as POST variables in a POST request. That covers adding a friend in one direction and maybe once the friend has accepted the friendship, the server can send back a similar request but with the owner's details, for which the original requestor is already waiting. A random password should also be sent in the original request and the responding request. If you request someone to be your friend, the server doesn't necessarily have to give access to them immediately. Even though they have a password for access, the server could reject them until they give the original requestor access.

@lukebarnard1 lukebarnard1 changed the title from Friend adding mechanism to Friend-adding mechanism Mar 27, 2015

@lukebarnard1 lukebarnard1 modified the milestone: 0.2.0 Mar 28, 2015

@lukebarnard1 lukebarnard1 self-assigned this Mar 28, 2015


This comment has been minimized.


lukebarnard1 commented Apr 25, 2015

This will require notifications #13 I think. Most notifications will just point to a certain post or comment. Others will require an action to be taken, but there could be a page for taking those actions.


This comment has been minimized.


lukebarnard1 commented May 20, 2015

Notifications are now implemented in a basic form. They are currently being used to send friend requests but these cannot be responded to yet. The next step would be to use the information in the notification to return a friend request.

  1. Receive friend request
  2. Visit non_friend page
  3. Accept friend request
    a. Setup User account for the new friend
    b. Send friend request back

This comment has been minimized.


lukebarnard1 commented May 21, 2015

OK, something has been created but it needs cleaning up desperately. I'm not sure if using the password field is clever. However, it does go unused until two people are friends so perhaps it just needs standardising across the code base (like having constant strings in one place and then referring to them).

Far too much is done by the "client" part of the site. The client should not access Users or Friends but it's getting closer to that. "Me" is now the person who has logged in instead of a constant global.

In short, the server needs to support friend adding, but this is just a case of moving code and rearranging url patterns.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment