WEBVTT

00:00.800 --> 00:02.200
Hi everyone!

00:02.240 --> 00:10.040
In this video we will face one more box inside the Foreign service over here.

00:10.600 --> 00:12.480
Okay, inside the function.

00:13.240 --> 00:15.920
Uh, send friend request over here.

00:16.320 --> 00:16.840
Okay.

00:19.360 --> 00:25.440
With the current approach, we already provide duplicate with same friend over here.

00:26.040 --> 00:27.680
And we throw the error.

00:27.720 --> 00:28.200
Right.

00:28.760 --> 00:36.360
But with this current approach, this does not enough at all.

00:36.640 --> 00:37.120
Okay.

00:38.840 --> 00:48.320
In here I only prevent from the sender's perspective, it means right now, for example, I send, we

00:49.400 --> 00:56.040
send friend request b, and if the I send b one more time we will prevent that.

00:56.080 --> 00:56.600
Right?

00:58.400 --> 01:08.690
But what happen if I send friend way and B also send friend request to AI at the same time.

01:09.090 --> 01:09.650
Okay.

01:09.690 --> 01:10.250
We want.

01:10.290 --> 01:12.610
This will also prevent right?

01:14.170 --> 01:22.410
If not, we will have to train our two friend request at the same time.

01:22.690 --> 01:27.490
So for that reason in this case I will use the Or operator over here.

01:27.890 --> 01:29.490
And that is an array.

01:29.930 --> 01:35.370
And we will create some filters object over here.

01:37.090 --> 01:39.210
The first one is exactly the same.

01:39.810 --> 01:46.010
The second one will be from the the sender with the receiver over here.

01:46.050 --> 01:46.530
Okay.

01:46.930 --> 01:49.490
So that is.

01:51.530 --> 01:53.930
That's the approach right now.

01:55.050 --> 02:04.970
And after you fix that you can change the message also a little bit over here to help the users understand.

02:05.290 --> 02:05.730
Okay.

02:05.770 --> 02:08.530
So that's for the video.

02:08.570 --> 02:10.650
And I will see you in the next one.
