WEBVTT

00:00.520 --> 00:02.040
Hi everyone.

00:02.320 --> 00:08.800
In this video let's handle the reject friend request.

00:09.240 --> 00:14.240
Okay, but before that, what happened?

00:14.280 --> 00:21.800
If I click on send friend request one more time?

00:22.480 --> 00:23.000
Okay.

00:23.920 --> 00:26.720
Now you can see in the database we already have.

00:28.760 --> 00:31.120
This friend request right here.

00:31.120 --> 00:34.160
And we already accept that okay.

00:35.400 --> 00:42.040
It means if I send one more time I should prevent that okay.

00:42.840 --> 00:51.640
But right here if I send it should work and it will create another thing will be pending.

00:51.960 --> 00:55.680
And that's what I want okay.

00:55.720 --> 00:57.520
That's not what I want.

00:57.560 --> 00:58.000
Okay.

01:00.610 --> 01:04.970
And what if you somehow prevent us because we already have this thing?

01:05.410 --> 01:11.530
Okay, so let me, uh, remove the last one.

01:13.370 --> 01:15.370
Let me show you how we can fix that.

01:15.650 --> 01:23.610
If we open the create method, you can say in here we already prevent duplicate with same frame, right.

01:24.330 --> 01:29.050
But in this case, we only check if this here will be pending status.

01:30.290 --> 01:30.810
Okay.

01:31.330 --> 01:40.450
So right here we should check if status is pending or accept we will prevent us.

01:42.770 --> 01:47.690
So in this guy I will put the the object.

01:50.610 --> 01:57.900
With the in operator and would arrive ready Accept.

01:57.940 --> 02:03.500
Okay, if they all accept, we will throw the error.

02:11.700 --> 02:13.980
Let's say right here.

02:13.980 --> 02:17.460
If I say okay, we already got error.

02:17.500 --> 02:21.020
The friend request already sent.

02:22.540 --> 02:23.060
Okay.

02:26.740 --> 02:30.260
So I think that will be enough.

02:31.220 --> 02:34.060
You can config the.

02:36.420 --> 02:42.100
The message right here a little bit, but I think that will be enough.

02:44.500 --> 02:45.020
Okay.

02:46.340 --> 02:48.260
And now let's build a reject.

02:50.700 --> 02:51.980
Friend request.

02:52.020 --> 02:58.470
Go back to the controller and let me hear.

03:00.830 --> 03:03.990
And ask Gentle Richard.

03:09.630 --> 03:19.590
Current use of run request array right here will be rechecked for a request and it are not exactly the

03:19.590 --> 03:19.910
same.

03:19.910 --> 03:23.550
Will not accept a friend request with a base.

03:25.790 --> 03:26.510
Rename.

03:28.550 --> 03:33.470
Okay, here we find the request okay.

03:34.070 --> 03:36.630
And we check here.

03:42.110 --> 03:42.950
We check it out.

03:42.950 --> 03:50.150
So right here we don't need to use reject and save that.

03:50.150 --> 03:55.930
We don't need to move anything over here, let me know, okay.

03:55.970 --> 04:01.210
Because in order to reject, we just need to put the reject over here.

04:01.250 --> 04:01.730
Okay.

04:06.930 --> 04:07.490
So.

04:09.650 --> 04:10.850
Until now, that is.

04:11.570 --> 04:15.890
Let me open the database and I will remove the friend request right here also.

04:16.210 --> 04:17.330
Let's remove that.

04:21.210 --> 04:30.690
And go to reducer and remove the array for right over here select manually remove.

04:30.690 --> 04:32.850
Just click on edit over here.

04:35.490 --> 04:37.690
So here update.

04:42.130 --> 04:46.650
Okay click edit here.

04:48.410 --> 04:51.090
Click on just icon and update.

04:55.380 --> 04:55.900
Okay.

04:56.540 --> 04:58.420
Now, after that, let me say it again.

04:59.900 --> 05:02.300
Let me send a friend request again.

05:04.780 --> 05:07.540
We already sent with the buddy status.

05:09.820 --> 05:13.940
And let me create the recheck.

05:22.020 --> 05:28.060
And make sure we login with the account receiver.

05:28.100 --> 05:28.620
Okay.

05:40.140 --> 05:41.820
And let's copy the ID.

05:54.830 --> 05:55.390
Okay.

05:57.750 --> 06:02.790
And let me click on friend request.

06:06.230 --> 06:06.590
Uh.

06:08.950 --> 06:10.150
Bot right here.

06:11.830 --> 06:14.310
Ah, sorry for that.

06:14.350 --> 06:17.110
We should create a reject.

06:17.110 --> 06:17.670
Okay.

06:17.710 --> 06:18.710
My bad, my bad.

06:20.310 --> 06:23.030
Let me, uh, delete it again.

06:32.110 --> 06:32.870
Users.

07:06.880 --> 07:09.120
Okay, let's set the request again.

07:11.480 --> 07:12.360
Goodbye, then.

07:12.360 --> 07:16.840
Copy the ID and move it over here.

07:22.640 --> 07:25.000
And let's click on Foreign requests.

07:29.080 --> 07:29.640
Okay.

07:30.000 --> 07:30.560
Let's do that.

07:30.600 --> 07:34.120
We will reject and click on the users.

07:37.960 --> 07:38.440
Okay.

07:38.440 --> 07:40.400
Still empty it manually.

07:40.440 --> 07:41.000
Aurora.

07:41.760 --> 07:42.280
Correct.

07:42.280 --> 07:42.760
Right.

07:44.000 --> 07:46.200
And this will be for the video.

07:46.400 --> 07:47.280
I will see you.
