-
Notifications
You must be signed in to change notification settings - Fork 98
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
Issue on Unblock Friend. #34
Comments
When we first implemented block_friend, it was for blocking someone from making a friend request. That is why But I see that it is useful to block/unblock a friend. On top of my head, a solution would be to have 2 different status for blocked friendship. Maybe Let me know if you have other suggestions. Edit I also see that method name |
Just to jump in on this, I think that unblock_friend performing two different functions depending on the state of the blocked individual (whether he is a friend or not) is a little weird. I think it would be better to make two explicit methods for these. Thoughts? |
block somebody should not rely on a friendship request
if we have been friends, and somehow a friend blocks another, then the friendships is cancelled. |
@krtschmr : do you mean you should be able to block people even if you do not have any type of relation with them? Why would that happen withing the scope of this gem? |
basically it's a question of *the abilities of a gem*
i checked a few gems and this one i like most but with lacking support of
blocking a user it's useless for us (and propably many others). instead of
hijacking a block-feature inside i propably build the whole thing from
scratch, based on our needs.
i just wanted to let you know, that if you can block a
friendship-request, you should be able to block people in general.
if somebody brings negative content all day, i want to block him (like
facebook), regardless of beeing friend with him. i don't read his
content in the future and he can't send me a friendship.
|
I see in which context you want to use the gem. This functionality could be added fairly easily. In the mean time you could just create a friendship and block it in the same controller. @mac.friend_request(@dee)
@dee.accept_request(@mac)
@mac.block_friend(@dee) |
yes i know. that's what we are doing since pretty mich 6 years and since
we now re-programm everything it's time to also not create a friendship
to block it. but seems like this is the way to do in most gems.
…---
Diese E-Mail wurde von Avast Antivirus-Software auf Viren geprüft.
https://www.avast.com/antivirus
|
What you want to do goes a bit outside of the scope of the gem. However I should be easy for you to add that functionality! |
I come back to this.
this blocks anything without an active friendship, so
this can only be "falsy" actually, is this a bug? maybe i should make own issue for that |
i think a more universal use-case would be
seems like i'll make this myself as hijacking work-arounds into your gem would be oversized. my approach would be
We create 2 relations to become friend, if one decides to block him the friendship is literally over. the own friendship will be converted into a block and the other friendship will be removed. i can write some tests and show you. |
https://gist.github.com/krtschmr/c9cb75ad364140ee5b6b953a1b1bb0cf allright, now i finished it myself, with all specs that we need. fitting us like a charme. feel free to take it as an inspiration and implement any of my ideas into your great gem. |
Hi All, All this while B still had A in his friend listing as B had not Blocked A |
@stingrayzboy have a look at this approach https://gist.github.com/krtschmr/c9cb75ad364140ee5b6b953a1b1bb0cf |
The text was updated successfully, but these errors were encountered: