-
Notifications
You must be signed in to change notification settings - Fork 151
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
getPendingFriends #56
Comments
Hi @nikolaynesov, |
@hootlex I am expecting to get Users that sent requests to Current User but their requests are still not ACCEPTED. Right now in my controller I temporary do it like this:
But it's a bit wrong and not efficient because getPendingFriendships() returns all friendships and not only where current user is recipient so then I need to use WHERE for user query to exclude current user... looks like we need another querybuilder method? |
Another thing is what if I want to make an auto-complete ajax search by pending friends, declined friends, accepted friends or friends in some group? ))) It means we need a more flexible way to build queries. Should it look something like:
|
A more flexible API is definitely needed. Unfortunately, @stephane-monnot and I, are too busy at the moment. I will probably start working on #16 next month. Regarding your current situation, I suggest to create two temporary methods to use until we go to V2:
BTW, I think that V2 deserves a decent documentation. I'd be glad if you guys could help me when the time comes. 😄 |
@nikolaynesov are you going to implement these methods before the v2? |
@hootlex not sure yet, but will let you know by Friday. |
@hootlex facing this same issue myself. Need to load details of users whose who have not yet accepted my friendship but getPendingFriendships() returns all instances regardless of whether the current user is the sender or recipient as such I cannot eager load getPendingFriendships()->load('recipient') the result as the current user themselves will show up in the list. Would really love a method that would return all pending requests either sent by me or sent to me with User details. Thanks. |
Hey,
We have already got getFriends() function to get Users with Friendship ACCEPTED status and other methods like getMutualFriends(), getFriendsOfFriends() . How about to introduce getPendingFriends to get Users (not friendships model like we do in getPendingFriendships()) ?
I want to show a list of pendings friends with some user info that I need get from the User Model and a button to accept the friendship request with a clean and easy method? What do you think? Or maybe I missed something?
The text was updated successfully, but these errors were encountered: