You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, using in some tests I found that if I ask a friend request, then that request is denied, if I ask another request (between same users) when the second one is accepted then all requests from that user are accepted, even if they were denied, so I have 2 friends count but with the same user.
In the trait I think could be changed /** * @param Model $recipient * * @return bool|int */ public function acceptFriendRequest(Model $recipient) { return $this->findFriendship($recipient)->whereRecipient($this)->update([ 'status' => Status::ACCEPTED, ]); }
with /** * @param Model $recipient * * @return bool|int */ public function acceptFriendRequest(Model $recipient) { return $this->findFriendship($recipient)->where('status', Status::PENDING)->whereRecipient($this)->update([ 'status' => Status::ACCEPTED, ]); }
on line 86
The text was updated successfully, but these errors were encountered:
Hi, using in some tests I found that if I ask a friend request, then that request is denied, if I ask another request (between same users) when the second one is accepted then all requests from that user are accepted, even if they were denied, so I have 2 friends count but with the same user.
In the trait I think could be changed
/** * @param Model $recipient * * @return bool|int */ public function acceptFriendRequest(Model $recipient) { return $this->findFriendship($recipient)->whereRecipient($this)->update([ 'status' => Status::ACCEPTED, ]); }
with
/** * @param Model $recipient * * @return bool|int */ public function acceptFriendRequest(Model $recipient) { return $this->findFriendship($recipient)->where('status', Status::PENDING)->whereRecipient($this)->update([ 'status' => Status::ACCEPTED, ]); }
on line 86
The text was updated successfully, but these errors were encountered: