-
Notifications
You must be signed in to change notification settings - Fork 20
Friending and Unfriending
ellio edited this page Feb 24, 2012
·
2 revisions
- Application.requestFriends(Long id)
- Attempts to request a friendship with user who's id is id, from the user who is connected. Will make users confirmed friends if the the other user has requested the connected one.
- Application.removeFriends(Long id)
- Attempts to remove friend (represented by id). Will do nothing if user's aren't friends.
- User.checkFriendship(Long id)
- Checks the current friendship status, returning a string representing the Relationship status. (Strongly consider changing the way this function works/specifically what it returns):
- id is the current user: ""
- id and the current user are confirmed friends: "Friends"
- current user has requested to be friends with id: "Friendship Requested"
- else: "Request Friendship"
- User.confirmedFriends()
- Returns a List containing all confirmed friends.
- User.requestedFriends()
- Returns a List containing all users who have requested to be friends with the current user.