{"action":"created","issue":{"url":"https://api.github.com/repos/hootlex/laravel-friendships/issues/29","repository_url":"https://api.github.com/repos/hootlex/laravel-friendships","labels_url":"https://api.github.com/repos/hootlex/laravel-friendships/issues/29/labels{/name}","comments_url":"https://api.github.com/repos/hootlex/laravel-friendships/issues/29/comments","events_url":"https://api.github.com/repos/hootlex/laravel-friendships/issues/29/events","html_url":"https://github.com/hootlex/laravel-friendships/issues/29","id":162798672,"number":29,"title":"If i block an user, next all befriend request will create duplicates","user":{"login":"masterix21","id":6555012,"avatar_url":"https://avatars.githubusercontent.com/u/6555012?v=3","gravatar_id":"","url":"https://api.github.com/users/masterix21","html_url":"https://github.com/masterix21","followers_url":"https://api.github.com/users/masterix21/followers","following_url":"https://api.github.com/users/masterix21/following{/other_user}","gists_url":"https://api.github.com/users/masterix21/gists{/gist_id}","starred_url":"https://api.github.com/users/masterix21/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/masterix21/subscriptions","organizations_url":"https://api.github.com/users/masterix21/orgs","repos_url":"https://api.github.com/users/masterix21/repos","events_url":"https://api.github.com/users/masterix21/events{/privacy}","received_events_url":"https://api.github.com/users/masterix21/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-06-28T22:05:48Z","updated_at":"2016-06-28T22:33:06Z","closed_at":null,"body":"I tried to use your package and i think that you've done a good work, but i found a bug (i think).\r\n\r\nTEST CASE: user \"$manOne\" (model User) isn't friend with \"$girlTwo\" (model User)\r\n`\r\n$manOne->blockFriend($girlTwo);\r\n$manOne->befriend($girlTwo);\r\n$manOne->befriend($girlTwo);\r\n$manOne->befriend($girlTwo);\r\n`\r\n\r\nIf you see database table, you'll find 4 rows. I know is not normal a block to non-friend user, but if i'd like a \"block\" for further friendship requests from an user, this should be a solution.\r\n\r\nThanks for your work."},"comment":{"url":"https://api.github.com/repos/hootlex/laravel-friendships/issues/comments/229204526","html_url":"https://github.com/hootlex/laravel-friendships/issues/29#issuecomment-229204526","issue_url":"https://api.github.com/repos/hootlex/laravel-friendships/issues/29","id":229204526,"user":{"login":"hootlex","id":6147968,"avatar_url":"https://avatars.githubusercontent.com/u/6147968?v=3","gravatar_id":"","url":"https://api.github.com/users/hootlex","html_url":"https://github.com/hootlex","followers_url":"https://api.github.com/users/hootlex/followers","following_url":"https://api.github.com/users/hootlex/following{/other_user}","gists_url":"https://api.github.com/users/hootlex/gists{/gist_id}","starred_url":"https://api.github.com/users/hootlex/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hootlex/subscriptions","organizations_url":"https://api.github.com/users/hootlex/orgs","repos_url":"https://api.github.com/users/hootlex/repos","events_url":"https://api.github.com/users/hootlex/events{/privacy}","received_events_url":"https://api.github.com/users/hootlex/received_events","type":"User","site_admin":false},"created_at":"2016-06-28T22:33:06Z","updated_at":"2016-06-28T22:33:06Z","body":"Hmm, hypothetical a user shouldn't send a friend request to a user who has blocked, before unblocking him first. But in case it happens, the duplicate rows is definitely a bug. :)\r\n\r\nIn your use case it should be:\r\n\r\n```php\r\n$manOne->blockFriend($girlTwo);\r\n$manOne->unblockFriend($girlTwo);\r\n$manOne->befriend($girlTwo);\r\n$manOne->befriend($girlTwo);\r\n$manOne->befriend($girlTwo);\r\n```\r\n\r\nI will update the package, so when a user sends a friend request to a user who has blocked, it will automatically unblock him."}}
{"actor":{"display_login":"hootlex"}}