multicaret / laravel-acquaintances

This package gives Eloquent models the ability to manage friendships (with groups), followships along with Likes, favorites..etc.
https://laravel-news.com/manage-friendships-likes-and-more-with-the-acquaintances-laravel-package
MIT License
808 stars 72 forks source link

Getting users blocked by current user only #103

Closed mercExec closed 8 months ago

mercExec commented 9 months ago

Hello

Is there a way to get all users that have been blocked by the current user (sender) only? getBlockedFriendships() returns records with user ID found in both 'sender' or 'receiver', so if both users blocked each other, they will have their own model returned as well.

I had to modify the method from this: return $this->getOrPaginate($this->findFriendships(Status::BLOCKED), $perPage, $fields); to this return $this->getOrPaginate($this->findFriendships(Status::BLOCKED, type: 'sender'), $perPage, $fields);

mkwsra commented 9 months ago

Hey there, thanks for using this library, if you wish you can create two functions and send them as a PR, and I will check it out and merge it

mercExec commented 9 months ago

Done. Function names could be changed since I'm terrible with naming conventions. Anyway, thank you for developing this library; it's the best one of all the libraries i found that serve the same purpose.

mkwsra commented 9 months ago

Thanks Merc so much for your contribution and for your nice words, I just published a new release v3.5.9

AntKovachev commented 8 months ago

@mkwsra, should this issue still be with status open? Is there anything else that needs to be done?

mkwsra commented 8 months ago

No, thanks, I will close it immediately