Hi everyone!
In this video we will face one more box inside the Foreign service over here.
Okay, inside the function.
Uh, send friend request over here.
Okay.
With the current approach, we already provide duplicate with same friend over here.
And we throw the error.
Right.
But with this current approach, this does not enough at all.
Okay.
In here I only prevent from the sender's perspective, it means right now, for example, I send, we
send friend request b, and if the I send b one more time we will prevent that.
Right?
But what happen if I send friend way and B also send friend request to AI at the same time.
Okay.
We want.
This will also prevent right?
If not, we will have to train our two friend request at the same time.
So for that reason in this case I will use the Or operator over here.
And that is an array.
And we will create some filters object over here.
The first one is exactly the same.
The second one will be from the the sender with the receiver over here.
Okay.
So that is.
That's the approach right now.
And after you fix that you can change the message also a little bit over here to help the users understand.
Okay.
So that's for the video.
And I will see you in the next one.